1 --- coreutils-5.2.1/configure.ac.selinux 2004-03-16 14:25:05.461535240 -0500
2 +++ coreutils-5.2.1/configure.ac 2004-03-16 14:25:05.594515024 -0500
4 LIB_PAM="-ldl -lpam -lpam_misc"
7 +dnl Give the chance to enable SELINUX
8 +AC_ARG_ENABLE(selinux, dnl
9 +[ --enable-selinux Enable use of the SELinux libraries],
10 +[AC_DEFINE(WITH_SELINUX, 1, [Define if you want to use SELinux])
11 +LIB_SELINUX="-lselinux"
12 +AC_SUBST(LIB_SELINUX)])
14 gl_DEFAULT_POSIX2_VERSION
15 gl_USE_SYSTEM_EXTENSIONS
17 --- coreutils-5.2.1/man/vdir.1.selinux 2004-03-02 17:52:33.000000000 -0500
18 +++ coreutils-5.2.1/man/vdir.1 2004-03-16 14:25:05.596514720 -0500
22 list one file per line
27 +Display security context. Enable \fB\-l\fR. Lines
28 +will probably be too wide for most displays.
31 +Display security context so it fits on most
32 +displays. Displays only mode, user, group,
33 +security context and file name.
36 +Display only security context and file name.
39 display this help and exit
40 --- coreutils-5.2.1/man/cp.1.selinux 2004-03-02 17:51:05.000000000 -0500
41 +++ coreutils-5.2.1/man/cp.1 2004-03-16 14:25:05.598514416 -0500
44 \fB\-\-preserve\fR[=\fIATTR_LIST\fR]
45 preserve the specified attributes (default:
46 -mode,ownership,timestamps), if possible
47 +mode,ownership,timestamps) and security contexts, if possible
48 additional attributes: links, all
50 \fB\-\-no\-preserve\fR=\fIATTR_LIST\fR
53 display this help and exit
55 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
56 +set security context of copy to CONTEXT
59 output version information and exit
61 --- coreutils-5.2.1/man/mkdir.1.selinux 2004-03-02 17:52:28.000000000 -0500
62 +++ coreutils-5.2.1/man/mkdir.1 2004-03-16 14:25:05.604513504 -0500
65 Mandatory arguments to long options are mandatory for short options too.
67 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR (SELinux) set security context to CONTEXT
69 \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
70 set permission mode (as in chmod), not rwxrwxrwx - umask
72 --- coreutils-5.2.1/man/ls.1.selinux 2004-03-02 17:52:28.000000000 -0500
73 +++ coreutils-5.2.1/man/ls.1 2004-03-16 14:25:05.606513200 -0500
77 list one file per line
82 +Display security context. Enable \fB\-l\fR. Lines
83 +will probably be too wide for most displays.
85 +\fB\-Z\fR, \fB\-\-context\fR
86 +Display security context so it fits on most
87 +displays. Displays only mode, user, group,
88 +security context and file name.
91 +Display only security context and file name.
94 display this help and exit
95 --- coreutils-5.2.1/man/mkfifo.1.selinux 2004-03-02 17:52:28.000000000 -0500
96 +++ coreutils-5.2.1/man/mkfifo.1 2004-03-16 14:25:05.609512744 -0500
99 Mandatory arguments to long options are mandatory for short options too.
101 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
102 +set security context (quoted string)
104 \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
105 set permission mode (as in chmod), not a=rw - umask
107 --- coreutils-5.2.1/man/Makefile.am.selinux 2004-01-23 10:54:23.000000000 -0500
108 +++ coreutils-5.2.1/man/Makefile.am 2004-03-16 14:25:05.614511984 -0500
110 rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
111 su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
112 tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
113 - who.1 whoami.1 yes.1
114 + who.1 whoami.1 yes.1 chcon.1 runcon.1
117 man_aux = $(dist_man_MANS:.1=.x)
119 who.1: $(common_dep) $(srcdir)/who.x ../src/who.c
120 whoami.1: $(common_dep) $(srcdir)/whoami.x ../src/whoami.c
121 yes.1: $(common_dep) $(srcdir)/yes.x ../src/yes.c
122 +chcon.1: $(common_dep) $(srcdir)/chcon.x ../src/chcon.c
123 +runcon.1: $(common_dep) $(srcdir)/runcon.x ../src/runcon.c
127 --- coreutils-5.2.1/man/mknod.1.selinux 2004-03-02 17:52:28.000000000 -0500
128 +++ coreutils-5.2.1/man/mknod.1 2004-03-16 14:25:05.617511528 -0500
131 Mandatory arguments to long options are mandatory for short options too.
133 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
134 +set security context (quoted string)
136 \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
137 set permission mode (as in chmod), not a=rw - umask
139 --- /dev/null 2004-02-23 16:02:56.000000000 -0500
140 +++ coreutils-5.2.1/man/runcon.1 2004-03-16 14:25:05.619511224 -0500
142 +.TH RUNCON "1" "July 2003" "runcon (coreutils) 5.0" "selinux"
144 +runcon \- run command with specified security context
147 +[\fI-t TYPE\fR] [\fI-l LEVEL\fR] [\fI-u USER\fR] [\fI-r ROLE\fR] \fICOMMAND\fR [\fIARGS...\fR]
152 +\fICONTEXT\fR \fICOMMAND\fR [\fIargs...\fR]
157 +.\" Add any additional description here
159 +Run COMMAND with current security context modified by one or more of LEVEL,
160 +ROLE, TYPE, and USER, or with completely-specified CONTEXT.
163 +change current type to the specified type
166 +change current level range to the specified range
169 +change current role to the specified role
172 +change current user to the specified user
174 +If none of \fI-t\fR, \fI-u\fR, \fI-r\fR, or \fI-l\fR, is specified,
175 +the first argument is used as the complete context. Any additional
176 +arguments after \fICOMMAND\fR are interpreted as arguments to the
179 +Note that only carefully-chosen contexts are likely to successfully
181 --- /dev/null 2004-02-23 16:02:56.000000000 -0500
182 +++ coreutils-5.2.1/man/chcon.1 2004-03-16 14:25:05.622510768 -0500
184 +.TH CHCON 1 "July 2003" "chcon (coreutils) 5.0" "User Commands"
186 +chcon \- change security context
189 +[\fIOPTION\fR]...\fI CONTEXT FILE\fR...
192 +[\fIOPTION\fR]...\fI --reference=RFILE FILE\fR...
195 +." Add any additional description here
197 +Change the security context of each FILE to CONTEXT.
199 +\fB\-c\fR, \fB\-\-changes\fR
200 +like verbose but report only when a change is made
202 +\fB\-h\fR, \fB\-\-no\-dereference\fR
203 +affect symbolic links instead of any referenced file (available only on systems with lchown system call)
205 +\fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
206 +suppress most error messages
208 +\fB\-l\fR, \fB\-\-range\fR
209 +set range RANGE in the target security context
211 +\fB\-\-reference\fR=\fIRFILE\fR
212 +use RFILE's context instead of using a CONTEXT value
214 +\fB\-R\fR, \fB\-\-recursive\fR
215 +change files and directories recursively
217 +\fB\-r\fR, \fB\-\-role\fR
218 +set role ROLE in the target security context
220 +\fB\-t\fR, \fB\-\-type\fR
221 +set type TYPE in the target security context
223 +\fB\-u\fR, \fB\-\-user\fR
224 +set user USER in the target security context
226 +\fB\-v\fR, \fB\-\-verbose\fR
227 +output a diagnostic for every file processed
230 +display this help and exit
233 +output version information and exit
234 +.SH "REPORTING BUGS"
235 +Report bugs to <email@host.com>.
237 +The full documentation for
239 +is maintained as a Texinfo manual. If the
243 +programs are properly installed at your site, the command
247 +should give you access to the complete manual.
248 --- coreutils-5.2.1/man/id.1.selinux 2004-03-02 17:52:27.000000000 -0500
249 +++ coreutils-5.2.1/man/id.1 2004-03-16 14:25:05.624510464 -0500
252 ignore, for compatibility with other versions
254 +\fB\-Z\fR, \fB\-\-context\fR
255 +print only the security context
257 \fB\-g\fR, \fB\-\-group\fR
258 print only the effective group ID
260 --- coreutils-5.2.1/man/stat.1.selinux 2004-03-02 17:52:31.000000000 -0500
261 +++ coreutils-5.2.1/man/stat.1 2004-03-16 14:25:05.627510008 -0500
263 \fB\-t\fR, \fB\-\-terse\fR
264 print the information in terse form
266 +\fB\-Z\fR, \fB\-\-context\fR
267 +print security context information for SELinux if available.
270 display this help and exit
274 Number of blocks allocated (see %B)
277 +SELinux security context
282 --- /dev/null 2004-02-23 16:02:56.000000000 -0500
283 +++ coreutils-5.2.1/man/chcon.x 2004-03-16 14:25:05.629509704 -0500
286 +chcon \- change file security context
288 +.\" Add any additional description here
289 --- coreutils-5.2.1/man/dir.1.selinux 2004-03-02 17:51:06.000000000 -0500
290 +++ coreutils-5.2.1/man/dir.1 2004-03-16 14:25:05.632509248 -0500
294 list one file per line
299 +Display security context. Enable \fB\-l\fR. Lines
300 +will probably be too wide for most displays.
303 +Display security context so it fits on most
304 +displays. Displays only mode, user, group,
305 +security context and file name.
308 +Display only security context and file name.
311 display this help and exit
312 --- /dev/null 2004-02-23 16:02:56.000000000 -0500
313 +++ coreutils-5.2.1/man/runcon.x 2004-03-16 14:25:05.634508944 -0500
316 +.\" Add any additional description here
317 --- coreutils-5.2.1/man/install.1.selinux 2004-03-16 14:25:05.238569136 -0500
318 +++ coreutils-5.2.1/man/install.1 2004-03-16 14:25:05.636508640 -0500
321 \fB\-v\fR, \fB\-\-verbose\fR
322 print the name of each directory as it is created
324 +\fB\-P\fR, \fB\-\-preserve_context\fR (SELinux) Preserve security context
326 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
327 +(SELinux) Set security context of files and directories
330 display this help and exit
331 --- coreutils-5.2.1/config.hin.selinux 2004-03-16 14:25:05.467534328 -0500
332 +++ coreutils-5.2.1/config.hin 2004-03-16 14:25:05.640508032 -0500
333 @@ -1374,6 +1374,9 @@
334 /* Define if sys/ptem.h is required for struct winsize. */
335 #undef WINSIZE_IN_PTEM
337 +/* Define if you want to use SELINUX */
340 /* Define to 1 if your processor stores words with the most significant byte
341 first (like Motorola and SPARC, unlike Intel and VAX). */
342 #undef WORDS_BIGENDIAN
343 --- coreutils-5.2.1/README.selinux 2004-01-18 02:59:41.000000000 -0500
344 +++ coreutils-5.2.1/README 2004-03-16 14:25:05.641507880 -0500
347 The programs that can be built with this package are:
349 - [ basename cat chgrp chmod chown chroot cksum comm cp csplit cut date dd
350 + [ basename cat chcon chgrp chmod chown chroot cksum comm cp csplit cut date dd
351 df dir dircolors dirname du echo env expand expr factor false fmt fold
352 ginstall groups head hostid hostname id join kill link ln logname ls
353 md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
354 - printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
355 + printenv printf ptx pwd readlink rm rmdir runcon seq sha1sum shred sleep sort
356 split stat stty su sum sync tac tail tee test touch tr true tsort tty
357 uname unexpand uniq unlink uptime users vdir wc who whoami yes
359 --- coreutils-5.2.1/tests/help-version.selinux 2004-02-17 11:04:23.000000000 -0500
360 +++ coreutils-5.2.1/tests/help-version 2004-03-16 14:25:05.643507576 -0500
363 # Skip `test'; it doesn't accept --help or --version.
364 test $i = test && continue;
365 + test $i = chcon && continue;
366 + test $i = runcon && continue;
368 # false fails even when invoked with --help or --version.
369 if test $i = false; then
372 for i in $all_programs; do
374 - case $i in chroot|stty|tty|false) continue;; esac
375 + case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
377 rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out
379 --- coreutils-5.2.1/src/mkdir.c.selinux 2004-01-21 17:27:02.000000000 -0500
380 +++ coreutils-5.2.1/src/mkdir.c 2004-03-16 14:25:05.645507272 -0500
383 #define AUTHORS "David MacKenzie"
386 +#include <selinux/selinux.h> /* for is_selinux_enabled() */
389 /* The name this program was run with. */
394 static struct option const longopts[] =
397 + {"context", required_argument, NULL, 'Z'},
399 {"mode", required_argument, NULL, 'm'},
400 {"parents", no_argument, NULL, 'p'},
401 {"verbose", no_argument, NULL, 'v'},
403 Create the DIRECTORY(ies), if they do not already exist.\n\
408 + -Z, --context=CONTEXT (SELinux) set security context to CONTEXT\n\
412 Mandatory arguments to long options are mandatory for short options too.\n\
419 + while ((optc = getopt_long (argc, argv, "pm:vZ:", longopts, NULL)) != -1)
421 while ((optc = getopt_long (argc, argv, "pm:v", longopts, NULL)) != -1)
427 case 'v': /* --verbose */
428 verbose_fmt_string = _("created directory %s");
432 + /* politely decline if we're not on a selinux-enabled kernel. */
433 + if( !(is_selinux_enabled()>0)) {
434 + fprintf( stderr, _("Sorry, --context (-Z) can be used only on a SELinux-enabled kernel.\n") );
437 + if (setfscreatecon(optarg)) {
438 + fprintf( stderr, _("Sorry, cannot set default context to %s.\n"), optarg);
443 case_GETOPT_HELP_CHAR;
444 case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
446 --- coreutils-5.2.1/src/cp.c.selinux 2004-03-16 14:25:05.411542840 -0500
447 +++ coreutils-5.2.1/src/cp.c 2004-03-16 14:25:05.648506816 -0500
450 #define AUTHORS "Torbjorn Granlund", "David MacKenzie", "Jim Meyering"
453 +#include <selinux/selinux.h> /* for is_selinux_enabled() */
454 +int selinux_enabled=0;
457 #ifndef _POSIX_VERSION
461 {"update", no_argument, NULL, 'u'},
462 {"verbose", no_argument, NULL, 'v'},
463 {"version-control", required_argument, NULL, 'V'}, /* Deprecated. FIXME. */
465 + {"context", required_argument, NULL, 'Z'},
467 {GETOPT_HELP_OPTION_DECL},
468 {GETOPT_VERSION_OPTION_DECL},
471 additional attributes: links, all\n\
474 + -c same as --preserve=context\n\
477 --no-preserve=ATTR_LIST don't preserve the specified attributes\n\
478 --parents append source path to DIRECTORY\n\
479 -P same as `--no-dereference'\n\
481 destination file is missing\n\
482 -v, --verbose explain what is being done\n\
483 -x, --one-file-system stay on this file system\n\
484 + -Z, --context=CONTEXT set security context of copy to CONTEXT\n\
486 fputs (HELP_OPTION_DESCRIPTION, stdout);
487 fputs (VERSION_OPTION_DESCRIPTION, stdout);
490 new_dest = (char *) dest;
493 - return copy (source, new_dest, new_dst, x, &unused, NULL);
494 + ret=copy (source, new_dest, new_dst, x, &unused, NULL);
500 x->preserve_mode = 0;
501 x->preserve_timestamps = 0;
504 + x->preserve_security_context = 0;
507 x->require_preserve = 0;
509 x->sparse_mode = SPARSE_AUTO;
510 @@ -800,19 +816,20 @@
517 static enum File_attribute const preserve_vals[] =
519 PRESERVE_MODE, PRESERVE_TIMESTAMPS,
520 - PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_ALL
521 + PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_ALL
524 /* Valid arguments to the `--preserve' option. */
525 static char const* const preserve_args[] =
527 "mode", "timestamps",
528 - "ownership", "links", "all", 0
529 + "ownership", "links", "context", "all", 0
532 char *arg_writable = xstrdup (arg);
533 @@ -847,11 +864,16 @@
534 x->preserve_links = on_off;
537 + case PRESERVE_CONTEXT:
538 + x->preserve_security_context = on_off;
542 x->preserve_mode = on_off;
543 x->preserve_timestamps = on_off;
544 x->preserve_ownership = on_off;
545 x->preserve_links = on_off;
546 + x->preserve_security_context = on_off;
552 int copy_contents = 0;
553 char *target_directory = NULL;
555 + security_context_t scontext = NULL;
556 + selinux_enabled= (is_selinux_enabled()>0);
559 initialize_main (&argc, &argv);
560 program_name = argv[0];
562 we'll actually use backup_suffix_string. */
563 backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
566 + while ((c = getopt_long (argc, argv, "abcdfHilLprsuvxPRS:V:Z:", long_opts, NULL))
568 while ((c = getopt_long (argc, argv, "abdfHilLprsuvxPRS:V:", long_opts, NULL))
573 @@ -981,6 +1011,35 @@
574 x.preserve_timestamps = 1;
575 x.require_preserve = 1;
579 + if ( scontext != NULL ) {
580 + (void) fprintf(stderr, _("%s: cannot force target context <-- %s and preserve it\n"), argv[0], scontext);
583 + else if (selinux_enabled)
584 + x.preserve_security_context = 1;
588 + /* politely decline if we're not on a selinux-enabled kernel. */
589 + if( !selinux_enabled ) {
590 + fprintf( stderr, _("Warning: ignoring --context (-Z). It requires a SELinux enabled kernel.\n") );
593 + if ( x.preserve_security_context ) {
594 + (void) fprintf(stderr, _("%s: cannot force target context to '%s' and preserve it\n"), argv[0], optarg);
598 + /* if there's a security_context given set new path
599 + components to that context, too */
600 + if ( setfscreatecon(scontext) < 0 ) {
601 + (void) fprintf(stderr, _("cannot set default security context %s"), scontext);
609 --- coreutils-5.2.1/src/stat.c.selinux 2004-02-05 08:46:12.000000000 -0500
610 +++ coreutils-5.2.1/src/stat.c 2004-03-16 14:25:05.652506208 -0500
616 +#include <selinux/selinux.h>
617 +#define SECURITY_ID_T security_context_t
619 +#define SECURITY_ID_T char *
626 {"dereference", no_argument, 0, 'L'},
627 {"format", required_argument, 0, 'c'},
628 {"filesystem", no_argument, 0, 'f'},
629 + {"context", no_argument, 0, 'Z'},
630 {"terse", no_argument, 0, 't'},
631 {GETOPT_HELP_OPTION_DECL},
632 {GETOPT_VERSION_OPTION_DECL},
634 /* print statfs info */
636 print_statfs (char *pformat, char m, char const *filename,
638 + void const *data,SECURITY_ID_T scontext)
640 STRUCT_STATVFS const *statfsbuf = data;
643 strcat (pformat, PRIdMAX);
644 printf (pformat, (intmax_t) (statfsbuf->f_ffree));
648 + strcat (pformat, "s");
652 strcat (pformat, "c");
656 /* print stat info */
658 -print_stat (char *pformat, char m, char const *filename, void const *data)
659 +print_stat (char *pformat, char m, char const *filename, void const *data, SECURITY_ID_T scontext)
661 struct stat *statbuf = (struct stat *) data;
662 struct passwd *pw_ent;
664 strcat (pformat, "d");
665 printf (pformat, (int) statbuf->st_ctime);
668 + strcat (pformat, "s");
669 + printf(pformat,scontext);
672 strcat (pformat, "c");
677 print_it (char const *masterformat, char const *filename,
678 - void (*print_func) (char *, char, char const *, void const *),
680 + void (*print_func) (char *, char, char const *, void const *,SECURITY_ID_T ),
681 + void const *data, SECURITY_ID_T scontext)
689 - print_func (dest, *p, filename, data);
690 + print_func (dest, *p, filename, data,scontext);
696 /* stat the filesystem and print what we find */
698 -do_statfs (char const *filename, int terse, char const *format)
699 +do_statfs (char const *filename, int terse, int secure, char const *format)
701 STRUCT_STATVFS statfsbuf;
702 + SECURITY_ID_T scontext = NULL;
705 + if (getfilecon(filename,&scontext)<0) {
710 int i = statfs (filename, &statfsbuf);
713 @@ -629,23 +652,40 @@
718 - ? "%n %i %l %t %b %f %a %s %c %d"
719 - : " File: \"%n\"\n"
720 - " ID: %-8i Namelen: %-7l Type: %T\n"
721 - "Blocks: Total: %-10b Free: %-10f Available: %-10a Size: %s\n"
722 - "Inodes: Total: %-10c Free: %-10d");
725 - print_it (format, filename, print_statfs, &statfsbuf);
728 + format = "%n %i %l %t %b %f %a %s %c %d %C";
730 + format = "%n %i %l %t %b %f %a %s %c %d";
735 + format = " File: \"%n\"\n"
736 + " ID: %-8i Namelen: %-7l Type: %T\n"
737 + "Blocks: Total: %-10b Free: %-10f Available: %-10a Size: %s\n"
738 + "Inodes: Total: %-10c Free: %-10d\n"
739 + " S_Context: %C\n";
741 + format= " File: \"%n\"\n"
742 + " ID: %-8i Namelen: %-7l Type: %T\n"
743 + "Blocks: Total: %-10b Free: %-10f Available: %-10a Size: %s\n"
744 + "Inodes: Total: %-10c Free: %-10d";
747 + print_it (format, filename, print_statfs, &statfsbuf,scontext);
749 + if (scontext != NULL)
754 /* stat the file and print what we find */
756 -do_stat (char const *filename, int follow_links, int terse,
757 + do_stat (char const *filename, int follow_links, int terse,int secure,
761 + SECURITY_ID_T scontext = NULL;
762 int i = ((follow_links == 1)
763 ? stat (filename, &statbuf)
764 : lstat (filename, &statbuf));
765 @@ -656,11 +696,28 @@
772 + i=lgetfilecon(filename, &scontext);
774 + i=getfilecon(filename, &scontext);
787 - format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o";
789 + format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o %C";
791 + format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o";
796 i = statbuf.st_mode & S_IFMT;
797 if (i == S_IFCHR || i == S_IFBLK)
803 + " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
804 + "Device: %Dh/%dd\tInode: %-10i Links: %-5h"
805 + " Device type: %t,%T\n"
806 + "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"
808 + "Access: %x\n" "Modify: %y\n" "Change: %z\n";
812 " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
813 "Device: %Dh/%dd\tInode: %-10i Links: %-5h"
821 + " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
822 + "Device: %Dh/%dd\tInode: %-10i Links: %-5h\n"
823 + "Access: (%04a/%10.10A) Uid: (%5u/%8U) Gid: (%5g/%8G)\n"
825 + "Access: %x\n" "Modify: %y\n" "Change: %z\n";
829 " Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
834 - print_it (format, filename, print_stat, &statbuf);
835 + print_it (format, filename, print_stat, &statbuf,scontext);
844 -f, --filesystem display filesystem status instead of file status\n\
845 -c --format=FORMAT use the specified FORMAT instead of the default\n\
846 -L, --dereference follow links\n\
847 + -Z, --context print the security context\n\
848 -t, --terse print the information in terse form\n\
850 fputs (HELP_OPTION_DESCRIPTION, stdout);
852 %c Total file nodes in file system\n\
853 %d Free file nodes in file system\n\
854 %f Free blocks in file system\n\
855 + %C Security context in SELinux\n\
858 %i File System id in hex\n\
860 int follow_links = 0;
866 initialize_main (&argc, &argv);
869 atexit (close_stdout);
871 - while ((c = getopt_long (argc, argv, "c:fLlt", long_options, NULL)) != -1)
872 + while ((c = getopt_long (argc, argv, "c:fLltZ", long_options, NULL)) != -1)
881 + if((is_selinux_enabled()>0))
884 + error (0, 0, _("Kernel is not SELinux enabled"));
885 + usage (EXIT_FAILURE);
889 case_GETOPT_HELP_CHAR;
892 for (i = optind; i < argc; i++)
895 - do_stat (argv[i], follow_links, terse, format);
896 + do_stat (argv[i], follow_links, terse, secure, format);
898 - do_statfs (argv[i], terse, format);
899 + do_statfs (argv[i], terse, secure, format);
902 exit (G_fail ? EXIT_FAILURE : EXIT_SUCCESS);
903 --- coreutils-5.2.1/src/ls.c.selinux 2004-03-16 14:25:05.406543600 -0500
904 +++ coreutils-5.2.1/src/ls.c 2004-03-16 14:25:05.675502712 -0500
907 #define AUTHORS "Richard Stallman", "David MacKenzie"
910 +#include <selinux/selinux.h>
911 +int selinux_enabled= 0;
912 +static int print_scontext = 0;
913 +#define check_selinux() if (!selinux_enabled) { \
914 + fprintf( stderr, _("Sorry, this option can only be used on a SELinux-enabled kernel.\n") ); \
915 + exit( EXIT_FAILURE ); \
920 #define obstack_chunk_alloc malloc
921 #define obstack_chunk_free free
924 /* For long listings, true if the file has an access control list. */
929 + security_context_t scontext;
933 #if HAVE_ACL || USE_ACL
935 static void sort_files (void);
936 static void parse_ls_color (void);
937 void usage (int status);
939 +static void print_scontext_format (const struct fileinfo *f);
942 /* The name the program was run with, stripped of any leading path. */
945 one_per_line, /* -1 */
946 many_per_line, /* -C */
948 - with_commas /* -m */
950 + security_format, /* -Z */
952 + with_commas /* -m */
955 static enum format format;
957 SHOW_CONTROL_CHARS_OPTION,
969 {"time-style", required_argument, 0, TIME_STYLE_OPTION},
970 {"color", optional_argument, 0, COLOR_OPTION},
971 {"block-size", required_argument, 0, BLOCK_SIZE_OPTION},
973 + {"context", no_argument, 0, CONTEXT_OPTION},
974 + {"lcontext", no_argument, 0, LCONTEXT_OPTION},
975 + {"scontext", no_argument, 0, SCONTEXT_OPTION},
977 {"author", no_argument, 0, AUTHOR_OPTION},
978 {GETOPT_HELP_OPTION_DECL},
979 {GETOPT_VERSION_OPTION_DECL},
980 @@ -731,12 +762,19 @@
981 static char const *const format_args[] =
983 "verbose", "long", "commas", "horizontal", "across",
984 - "vertical", "single-column", 0
985 + "vertical", "single-column",
992 static enum format const format_types[] =
994 long_format, long_format, with_commas, horizontal, horizontal,
998 many_per_line, one_per_line
1001 @@ -1101,6 +1139,9 @@
1003 format_needs_stat = sort_type == sort_time || sort_type == sort_size
1004 || format == long_format
1005 +#ifdef WITH_SELINUX
1006 + || format == security_format || print_scontext
1008 || dereference == DEREF_ALWAYS
1009 || print_block_size || print_inode;
1010 format_needs_type = (format_needs_stat == 0
1011 @@ -1223,6 +1265,11 @@
1012 /* Record whether there is an option specifying sort type. */
1013 int sort_type_specified = 0;
1015 +#ifdef WITH_SELINUX
1016 + /* 1 iff kernel has new selinux system calls */
1017 + selinux_enabled= (is_selinux_enabled()>0);
1020 qmark_funny_chars = 0;
1022 /* initialize all switches to default settings */
1023 @@ -1273,6 +1319,9 @@
1025 really_all_files = 0;
1026 ignore_patterns = 0;
1027 +#ifdef WITH_SELINUX
1028 + print_scontext = 0;
1031 /* FIXME: put this in a function. */
1033 @@ -1350,7 +1399,7 @@
1036 while ((c = getopt_long (argc, argv,
1037 - "abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1",
1038 + "abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1Z",
1039 long_options, NULL)) != -1)
1042 @@ -1470,6 +1519,13 @@
1043 format = horizontal;
1046 +#ifdef WITH_SELINUX
1049 + print_scontext = 1;
1050 + format = security_format;
1054 really_all_files = 0;
1056 @@ -1637,6 +1693,25 @@
1058 case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
1060 +#ifdef WITH_SELINUX
1062 + case CONTEXT_OPTION: /* new security format */
1064 + print_scontext = 1;
1065 + format = security_format;
1067 + case LCONTEXT_OPTION: /* long format plus security context */
1069 + print_scontext = 1;
1070 + format = long_format;
1072 + case SCONTEXT_OPTION: /* short form of new security format */
1074 + print_scontext = 0;
1075 + format = security_format;
1080 usage (EXIT_FAILURE);
1082 @@ -2300,6 +2375,12 @@
1083 free (files[i].name);
1084 if (files[i].linkname)
1085 free (files[i].linkname);
1086 +#ifdef WITH_SELINUX
1087 + if (files[i].scontext) {
1088 + freecon (files[i].scontext);
1089 + files[i].scontext=NULL;
1095 @@ -2336,6 +2417,9 @@
1099 +#ifdef WITH_SELINUX
1100 + f->scontext = NULL;
1104 || format_needs_stat
1105 @@ -2381,6 +2465,11 @@
1108 err = stat (path, &f->stat);
1109 +#ifdef WITH_SELINUX
1111 + if (selinux_enabled && (format == security_format || print_scontext))
1112 + getfilecon(path, &f->scontext);
1115 if (dereference == DEREF_COMMAND_LINE_ARGUMENTS)
1117 @@ -2399,6 +2488,11 @@
1119 default: /* DEREF_NEVER */
1120 err = lstat (path, &f->stat);
1121 +#ifdef WITH_SELINUX
1123 + if (selinux_enabled && (format == security_format || print_scontext))
1124 + lgetfilecon(path, &f->scontext);
1129 @@ -2893,6 +2987,16 @@
1130 DIRED_PUTCHAR ('\n');
1134 +#ifdef WITH_SELINUX
1135 + case security_format:
1136 + for (i = 0; i < files_index; i++)
1138 + print_scontext_format (files + i);
1139 + DIRED_PUTCHAR ('\n');
1146 @@ -3117,6 +3221,14 @@
1148 p += sizeof modebuf + nlink_width + 1;
1150 +#ifdef WITH_SELINUX
1152 + if ( print_scontext ) {
1153 + sprintf (p, "%-32s ", f->scontext);
1160 if (print_owner | print_group | print_author)
1161 @@ -4037,6 +4149,16 @@
1162 -X sort alphabetically by entry extension\n\
1163 -1 list one file per line\n\
1165 +#ifdef WITH_SELINUX
1166 +printf(_("\nSELinux options:\n\n\
1167 + --lcontext Display security context. Enable -l. Lines\n\
1168 + will probably be too wide for most displays.\n\
1169 + -Z, --context Display security context so it fits on most\n\
1170 + displays. Displays only mode, user, group,\n\
1171 + security context and file name.\n\
1172 + --scontext Display only security context and file name.\n\
1175 fputs (HELP_OPTION_DESCRIPTION, stdout);
1176 fputs (VERSION_OPTION_DESCRIPTION, stdout);
1178 @@ -4055,3 +4177,79 @@
1183 +#ifdef WITH_SELINUX
1186 +print_scontext_format (const struct fileinfo *f)
1190 + /* 7 fields that may require LONGEST_HUMAN_READABLE bytes,
1191 + 1 10-byte mode string,
1192 + 9 spaces, one following each of these fields, and
1193 + 1 trailing NUL byte. */
1195 + char init_bigbuf[7 * LONGEST_HUMAN_READABLE + 10 + 9 + 1];
1196 + char *buf = init_bigbuf;
1197 + size_t bufsize = sizeof (init_bigbuf);
1208 + if ( print_scontext ) { /* zero means terse listing */
1209 + mode_string (f->stat.st_mode, modebuf);
1210 + modebuf[10] = (FILE_HAS_ACL (f) ? '+' : ' ');
1211 + modebuf[11] = '\0';
1215 + (void) sprintf (p, "%s ", modebuf);
1218 + /* print standard user and group */
1220 + user_name = (numeric_ids ? NULL : getuser (f->stat.st_uid));
1222 + (void) sprintf (p, "%-8.8s ", user_name);
1224 + (void) sprintf (p, "%-8u ", (unsigned int) f->stat.st_uid);
1227 + if ( print_group ) {
1228 + group_name = (numeric_ids ? NULL : getgroup (f->stat.st_gid));
1230 + (void) sprintf (p, "%-8.8s ", group_name);
1232 + (void) sprintf (p, "%-8u ", (unsigned int) f->stat.st_gid);
1237 + (void) sprintf (p, "%-32s ", f->scontext);
1241 + DIRED_FPUTS (buf, stdout, p - buf);
1242 + print_name_with_quoting (f->name, f->stat.st_mode, f->linkok, &dired_obstack);
1244 + if (f->filetype == symbolic_link) {
1245 + if (f->linkname) {
1246 + DIRED_FPUTS_LITERAL (" -> ", stdout);
1247 + print_name_with_quoting (f->linkname, f->linkmode, f->linkok - 1, NULL);
1248 + if (indicator_style != none)
1249 + print_type_indicator (f->linkmode);
1253 + if (indicator_style != none)
1254 + print_type_indicator (f->stat.st_mode);
1258 --- coreutils-5.2.1/src/copy.h.selinux 2004-03-16 14:25:05.413542536 -0500
1259 +++ coreutils-5.2.1/src/copy.h 2004-03-16 14:25:05.677502408 -0500
1261 int preserve_ownership;
1263 int preserve_timestamps;
1264 +#ifdef WITH_SELINUX
1265 + int preserve_security_context;
1268 /* Enabled for mv, and for cp by the --preserve=links option.
1269 If nonzero, attempt to preserve in the destination files any
1270 --- coreutils-5.2.1/src/mknod.c.selinux 2004-01-21 17:27:02.000000000 -0500
1271 +++ coreutils-5.2.1/src/mknod.c 2004-03-16 14:25:05.679502104 -0500
1273 /* The name this program was run with. */
1276 +#ifdef WITH_SELINUX
1277 +#include <selinux/selinux.h>
1280 static struct option const longopts[] =
1282 +#ifdef WITH_SELINUX
1283 + {"context", required_argument, NULL, 'Z'},
1285 {"mode", required_argument, NULL, 'm'},
1286 {GETOPT_HELP_OPTION_DECL},
1287 {GETOPT_VERSION_OPTION_DECL},
1289 Create the special file NAME of the given TYPE.\n\
1292 +#ifdef WITH_SELINUX
1294 + -Z, --context=CONTEXT set security context (quoted string)\n\
1298 Mandatory arguments to long options are mandatory for short options too.\n\
1300 @@ -103,7 +115,11 @@
1302 specified_mode = NULL;
1304 +#ifdef WITH_SELINUX
1305 + while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
1307 while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1)
1312 @@ -112,6 +128,19 @@
1314 specified_mode = optarg;
1316 +#ifdef WITH_SELINUX
1318 + /* politely decline if we're not on a selinux-enabled kernel. */
1319 + if( !(is_selinux_enabled()>0)) {
1320 + fprintf( stderr, _("Sorry, --context (-Z) can be used only on a SELinux-enabled kernel.\n") );
1323 + if (setfscreatecon(optarg)) {
1324 + fprintf( stderr, _("Sorry, cannot set default context to %s.\n"), optarg);
1329 case_GETOPT_HELP_CHAR;
1330 case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
1332 --- coreutils-5.2.1/src/mkfifo.c.selinux 2004-01-21 17:27:02.000000000 -0500
1333 +++ coreutils-5.2.1/src/mkfifo.c 2004-03-16 14:25:05.682501648 -0500
1336 #define AUTHORS "David MacKenzie"
1338 +#ifdef WITH_SELINUX
1339 +#include <selinux/selinux.h> /* for is_selinux_enabled() */
1342 /* The name this program was run with. */
1345 static struct option const longopts[] =
1347 +#ifdef WITH_SELINUX
1348 + {"context", required_argument, NULL, 'Z'},
1350 {"mode", required_argument, NULL, 'm'},
1351 {GETOPT_HELP_OPTION_DECL},
1352 {GETOPT_VERSION_OPTION_DECL},
1354 Create named pipes (FIFOs) with the given NAMEs.\n\
1357 +#ifdef WITH_SELINUX
1359 + -Z, --context=CONTEXT set security context (quoted string)\n\
1363 Mandatory arguments to long options are mandatory for short options too.\n\
1367 error (EXIT_FAILURE, 0, _("fifo files not supported"));
1369 +#ifdef WITH_SELINUX
1370 + while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
1372 while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1)
1377 @@ -102,6 +118,18 @@
1379 specified_mode = optarg;
1381 +#ifdef WITH_SELINUX
1383 + if( !(is_selinux_enabled()>0)) {
1384 + fprintf( stderr, _("Sorry, --context (-Z) can be used only on a SELinux-enabled kernel.\n") );
1387 + if (setfscreatecon(optarg)) {
1388 + fprintf( stderr, _("Sorry, cannot set default context to %s.\n"), optarg);
1393 case_GETOPT_HELP_CHAR;
1394 case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
1396 --- coreutils-5.2.1/src/Makefile.am.selinux 2004-03-16 14:25:05.455536152 -0500
1397 +++ coreutils-5.2.1/src/Makefile.am 2004-03-16 14:25:05.684501344 -0500
1399 EXTRA_PROGRAMS = chroot df hostid nice pinky stty su uname uptime users who
1401 bin_SCRIPTS = groups
1402 -bin_PROGRAMS = [ chgrp chown chmod cp dd dircolors du \
1403 +bin_PROGRAMS = [ chgrp chown chmod chcon cp dd dircolors du \
1404 ginstall link ln dir vdir ls mkdir \
1405 mkfifo mknod mv nohup readlink rm rmdir shred stat sync touch unlink \
1406 cat cksum comm csplit cut expand fmt fold head join md5sum \
1407 nl od paste pr ptx sha1sum sort split sum tac tail tr tsort unexpand uniq wc \
1408 basename date dirname echo env expr factor false getgid \
1409 - hostname id kill logname pathchk printenv printf pwd seq sleep tee \
1410 + hostname id kill logname pathchk printenv printf pwd runcon seq sleep tee \
1411 test true tty whoami yes \
1412 $(OPTIONAL_BIN_PROGS) $(DF_PROG)
1415 # replacement functions defined in libfetish.a.
1416 LDADD = ../lib/libfetish.a $(LIBINTL) ../lib/libfetish.a
1418 -dir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBACL@
1419 -ls_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBACL@
1420 +dir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBACL@ @LIB_SELINUX@
1421 +ls_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBACL@ @LIB_SELINUX@
1422 shred_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
1423 -vdir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBACL@
1424 -cp_LDADD = $(LDADD) @LIBACL@
1425 -ginstall_LDADD = $(LDADD) @LIBACL@
1426 -mv_LDADD = $(LDADD) @LIBACL@
1427 +vdir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) @LIBACL@ @LIB_SELINUX@
1428 +cp_LDADD = $(LDADD) @LIBACL@ @LIB_SELINUX@
1429 +ginstall_LDADD = $(LDADD) @LIBACL@ @LIB_SELINUX@
1430 +mv_LDADD = $(LDADD) @LIBACL@ @LIB_SELINUX@
1431 +chcon_LDADD = $(LDADD) @LIB_SELINUX@
1432 +id_LDADD = $(LDADD) @LIB_SELINUX@
1433 +mkdir_LDADD = $(LDADD) @LIB_SELINUX@
1434 +mkfifo_LDADD = $(LDADD) @LIB_SELINUX@
1435 +mknod_LDADD = $(LDADD) @LIB_SELINUX@
1436 +stat_LDADD = $(LDADD) @LIB_SELINUX@
1437 +runcon_LDADD = $(LDADD) @LIB_SELINUX@
1439 ## If necessary, add -lm to resolve use of pow in lib/strtod.c.
1440 sort_LDADD = $(LDADD) $(POW_LIB)
1441 --- /dev/null 2004-02-23 16:02:56.000000000 -0500
1442 +++ coreutils-5.2.1/src/chcon.c 2004-03-16 14:25:05.688500736 -0500
1444 +/* chcontext -- change security context of a pathname */
1446 +#include <config.h>
1448 +#include <sys/types.h>
1450 +#include <getopt.h>
1451 +#include <selinux/selinux.h>
1452 +#include <selinux/context.h>
1454 +#include "system.h"
1456 +#include "savedir.h"
1457 +#include "group-member.h"
1463 + CH_NO_CHANGE_REQUESTED
1468 + /* Print a message for each file that is processed. */
1471 + /* Print a message for each file whose attributes we change. */
1474 + /* Do not be verbose. This is the default. */
1478 +static int change_dir_context (const char *dir, const struct stat *statp);
1480 +/* The name the program was run with. */
1481 +char *program_name;
1483 +/* If nonzero, and the systems has support for it, change the context
1484 + of symbolic links rather than any files they point to. */
1485 +static int change_symlinks;
1487 +/* If nonzero, change the context of directories recursively. */
1488 +static int recurse;
1490 +/* If nonzero, force silence (no error messages). */
1491 +static int force_silent;
1493 +/* Level of verbosity. */
1494 +static enum Verbosity verbosity = V_off;
1496 +/* The name of the context file is being given. */
1497 +static const char *specified_context;
1499 +/* Specific components of the context */
1500 +static const char *specified_user;
1501 +static const char *specified_role;
1502 +static const char *specified_range;
1503 +static const char *specified_type;
1505 +/* The argument to the --reference option. Use the context of this file.
1506 + This file must exist. */
1507 +static char *reference_file;
1509 +/* If nonzero, display usage information and exit. */
1510 +static int show_help;
1512 +/* If nonzero, print the version on standard output and exit. */
1513 +static int show_version;
1515 +static struct option const long_options[] =
1517 + {"recursive", no_argument, 0, 'R'},
1518 + {"changes", no_argument, 0, 'c'},
1519 + {"no-dereference", no_argument, 0, 'h'},
1520 + {"silent", no_argument, 0, 'f'},
1521 + {"quiet", no_argument, 0, 'f'},
1522 + {"reference", required_argument, 0, CHAR_MAX + 1},
1523 + {"context", required_argument, 0, CHAR_MAX + 2},
1524 + {"user", required_argument, 0, 'u'},
1525 + {"role", required_argument, 0, 'r'},
1526 + {"type", required_argument, 0, 't'},
1527 + {"range", required_argument, 0, 'l'},
1528 + {"verbose", no_argument, 0, 'v'},
1529 + {"help", no_argument, &show_help, 1},
1530 + {"version", no_argument, &show_version, 1},
1534 +/* Tell the user how/if the context of FILE has been changed.
1535 + CHANGED describes what (if anything) has happened. */
1538 +describe_change (const char *file, security_context_t newcontext, enum Change_status changed)
1543 + case CH_SUCCEEDED:
1544 + fmt = _("context of %s changed to %s\n");
1547 + fmt = _("failed to change context of %s to %s\n");
1549 + case CH_NO_CHANGE_REQUESTED:
1550 + fmt = _("context of %s retained as %s\n");
1555 + printf (fmt, file, newcontext);
1559 +compute_context_from_mask (security_context_t context, context_t *ret)
1561 + context_t newcontext = context_new (context);
1564 +#define SETCOMPONENT(comp) \
1566 + if (specified_ ## comp) \
1567 + if (context_ ## comp ## _set (newcontext, specified_ ## comp)) \
1571 + SETCOMPONENT(user);
1572 + SETCOMPONENT(range);
1573 + SETCOMPONENT(role);
1574 + SETCOMPONENT(type);
1575 +#undef SETCOMPONENT
1577 + *ret = newcontext;
1580 + context_free (newcontext);
1584 +/* Change the context of FILE, using specified components.
1585 + If it is a directory and -R is given, recurse.
1586 + Return 0 if successful, 1 if errors occurred. */
1589 +change_file_context (const char *file)
1591 + struct stat file_stats;
1592 + security_context_t file_context=NULL;
1593 + context_t context;
1594 + security_context_t context_string;
1598 + if (change_symlinks)
1599 + status = lgetfilecon(file, &file_context);
1601 + status = getfilecon(file, &file_context);
1603 + if ((status < 0) && (errno != ENODATA))
1605 + if (force_silent == 0)
1606 + error (0, errno, "%s", file);
1610 + /* If the file doesn't have a context, and we're not setting all of
1611 + the context components, there isn't really an obvious default.
1612 + Thus, we just give up. */
1613 + if (file_context == NULL && specified_context == NULL)
1615 + error (0, 0, _("can't apply partial context to unlabeled file %s"), file);
1619 + if (specified_context == NULL)
1621 + if (compute_context_from_mask (file_context, &context))
1623 + error (0, 0, _("couldn't compute security context from %s"), file_context);
1629 + context = context_new (specified_context);
1631 + error (1, 0,_("invalid context: %s"),specified_context);
1634 + context_string = context_str (context);
1636 + if (file_context == NULL || strcmp(context_string,file_context)!=0)
1640 + if (change_symlinks)
1641 + fail = lsetfilecon (file, context_string);
1643 + fail = setfilecon (file, context_string);
1645 + if (verbosity == V_high || (verbosity == V_changes_only && !fail))
1646 + describe_change (file, context_string, (fail ? CH_FAILED : CH_SUCCEEDED));
1651 + if (force_silent == 0)
1653 + error (0, errno, _("failed to change context of %s to %s"), file, context_string);
1657 + else if (verbosity == V_high)
1659 + describe_change (file, context_string, CH_NO_CHANGE_REQUESTED);
1662 + context_free(context);
1663 + freecon(file_context);
1666 + if (lstat(file, &file_stats)==0)
1667 + if (S_ISDIR (file_stats.st_mode) &&
1668 + (strcmp(file,"..") !=0) &&
1669 + (strcmp(file,".") !=0))
1670 + errors |= change_dir_context (file, &file_stats);
1675 +/* Recursively change context of the files in directory DIR
1676 + using specified context components.
1677 + STATP points to the results of lstat on DIR.
1678 + Return 0 if successful, 1 if errors occurred. */
1681 +change_dir_context (const char *dir, const struct stat *statp)
1683 + char *name_space, *namep;
1684 + char *path; /* Full path of each entry to process. */
1685 + unsigned dirlength; /* Length of `dir' and '\0'. */
1686 + unsigned filelength; /* Length of each pathname to process. */
1687 + unsigned pathlength; /* Bytes allocated for `path'. */
1691 + name_space = savedir (dir);
1692 + if (name_space == NULL)
1696 + if (force_silent == 0)
1697 + error (0, errno, "%s", dir);
1701 + error (1, 0, _("virtual memory exhausted"));
1704 + dirlength = strlen (dir) + 1; /* + 1 is for the trailing '/'. */
1705 + pathlength = dirlength + 1;
1706 + /* Give `path' a dummy value; it will be reallocated before first use. */
1707 + path = xmalloc (pathlength);
1708 + strcpy (path, dir);
1709 + path[dirlength - 1] = '/';
1711 + for (namep = name_space; *namep; namep += filelength - dirlength)
1713 + filelength = dirlength + strlen (namep) + 1;
1714 + if (filelength > pathlength)
1716 + pathlength = filelength * 2;
1717 + path = xrealloc (path, pathlength);
1719 + strcpy (path + dirlength, namep);
1720 + errors |= change_file_context (path);
1723 + free (name_space);
1731 + fprintf (stderr, _("Try `%s --help' for more information.\n"),
1736 +Usage: %s [OPTION]... CONTEXT FILE...\n\
1737 + or: %s [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...\n\
1738 + or: %s [OPTION]... --reference=RFILE FILE...\n\
1740 + program_name, program_name, program_name);
1742 +Change the security context of each FILE to CONTEXT.\n\
1744 + -c, --changes like verbose but report only when a change is made\n\
1745 + -h, --no-dereference affect symbolic links instead of any referenced file\n\
1746 + (available only on systems with lchown system call)\n\
1747 + -f, --silent, --quiet suppress most error messages\n\
1748 + --reference=RFILE use RFILE's group instead of using a CONTEXT value\n\
1749 + -u, --user=USER set user USER in the target security context\n\
1750 + -r, --role=ROLE set role ROLE in the target security context\n\
1751 + -t, --type=TYPE set type TYPE in the target security context\n\
1752 + -l, --range=RANGE set range RANGE in the target security context\n\
1753 + -R, --recursive change files and directories recursively\n\
1754 + -v, --verbose output a diagnostic for every file processed\n\
1755 + --help display this help and exit\n\
1756 + --version output version information and exit\n\
1764 +main (int argc, char **argv)
1766 + security_context_t ref_context = NULL;
1769 + int component_specified = 0;
1771 + program_name = argv[0];
1772 + setlocale (LC_ALL, "");
1773 + bindtextdomain (PACKAGE, LOCALEDIR);
1774 + textdomain (PACKAGE);
1776 + recurse = force_silent = 0;
1778 + while ((optc = getopt_long (argc, argv, "Rcfhvu:r:t:l:", long_options, NULL)) != -1)
1785 + specified_user = optarg;
1786 + component_specified = 1;
1789 + specified_role = optarg;
1790 + component_specified = 1;
1793 + specified_type = optarg;
1794 + component_specified = 1;
1797 + specified_range = optarg;
1798 + component_specified = 1;
1800 + case CHAR_MAX + 1:
1801 + reference_file = optarg;
1807 + verbosity = V_changes_only;
1813 + change_symlinks = 1;
1816 + verbosity = V_high;
1825 + printf ("chcon (%s) %s\n", GNU_PACKAGE, VERSION);
1834 + if (reference_file && component_specified)
1836 + error (0, 0, _("conflicting security context specifiers given"));
1840 + if (!(((reference_file || component_specified)
1841 + && (argc - optind > 0))
1842 + || (argc - optind > 1)))
1844 + error (0, 0, _("too few arguments"));
1848 + if (reference_file)
1850 + if (getfilecon (reference_file, &ref_context)<0)
1851 + error (1, errno, "%s", reference_file);
1853 + specified_context = ref_context;
1855 + else if (!component_specified) {
1856 + specified_context = argv[optind++];
1858 + for (; optind < argc; ++optind)
1859 + errors |= change_file_context (argv[optind]);
1861 + if (verbosity != V_off)
1863 + if (ref_context != NULL)
1864 + freecon(ref_context);
1867 --- coreutils-5.2.1/src/copy.c.selinux 2004-03-16 14:25:05.417541928 -0500
1868 +++ coreutils-5.2.1/src/copy.c 2004-03-16 14:25:56.729741288 -0500
1870 #include "utimens.h"
1871 #include "xreadlink.h"
1873 +#ifdef WITH_SELINUX
1874 +#include <selinux/selinux.h> /* for is_selinux_enabled() */
1875 +extern int selinux_enabled;
1878 #define DO_CHOWN(Chown, File, New_uid, New_gid) \
1879 (Chown (File, New_uid, New_gid) \
1880 /* If non-root uses -p, it's ok if we can't preserve ownership. \
1881 @@ -1288,6 +1293,34 @@
1882 In such cases, set this variable to zero. */
1883 preserve_metadata = 1;
1885 +#ifdef WITH_SELINUX
1886 + if (x->preserve_security_context && selinux_enabled)
1888 + security_context_t con;
1890 + if (lgetfilecon (src_path, &con) >= 0)
1892 + if (setfscreatecon(con) < 0)
1894 + error (0, errno, _("cannot set setfscreatecon %s"), quote (con));
1895 + if (x->require_preserve) {
1903 + if ( errno == ENOTSUP ) {
1904 + error (0, errno, _("warning: security context not preserved %s"), quote (src_path));
1906 + error (0, errno, _("cannot lgetfilecon %s"), quote (src_path));
1913 if (S_ISDIR (src_mode))
1915 struct dir_list *dir;
1916 @@ -1357,8 +1390,13 @@
1919 /* Are we crossing a file system boundary? */
1920 - if (x->one_file_system && device != 0 && device != src_sb.st_dev)
1921 + if (x->one_file_system && device != 0 && device != src_sb.st_dev) {
1922 +#ifdef WITH_SELINUX
1923 + if (x->preserve_security_context && selinux_enabled)
1924 + setfscreatecon(NULL);
1929 /* Copy the contents of the directory. */
1931 @@ -1491,6 +1529,11 @@
1935 +#ifdef WITH_SELINUX
1936 + if (x->preserve_security_context && selinux_enabled)
1937 + setfscreatecon(NULL);
1940 /* There's no need to preserve timestamps or permissions. */
1941 preserve_metadata = 0;
1943 @@ -1523,7 +1566,7 @@
1944 if (command_line_arg)
1945 record_file (x->dest_info, dst_path, NULL);
1947 - if ( ! preserve_metadata)
1948 + if ( ! preserve_metadata)
1951 /* POSIX says that `cp -p' must restore the following:
1952 @@ -1629,6 +1672,11 @@
1956 +#ifdef WITH_SELINUX
1957 + if (x->preserve_security_context && selinux_enabled)
1958 + setfscreatecon(NULL);
1961 /* We have failed to create the destination file.
1962 If we've just added a dev/ino entry via the remember_copied
1963 call above (i.e., unless we've just failed to create a hard link),
1964 --- coreutils-5.2.1/src/id.c.selinux 2004-01-21 17:27:02.000000000 -0500
1965 +++ coreutils-5.2.1/src/id.c 2004-03-16 14:25:05.695499672 -0500
1970 +#ifdef WITH_SELINUX
1971 +#include <selinux/selinux.h>
1972 +static void print_context (char* context);
1973 +/* Print the SELinux context */
1975 +print_context(char *context)
1977 + printf ("%s", context);
1980 +/* If nonzero, output only the SELinux context. -Z */
1981 +static int just_context = 0;
1984 static void print_user (uid_t uid);
1985 static void print_group (gid_t gid);
1986 static void print_group_list (const char *username);
1988 /* Nonzero if errors have been encountered. */
1989 static int problems = 0;
1991 +/* The SELinux context */
1992 +/* Set `context' to a known invalid value so print_full_info() will *
1993 + * know when `context' has not been set to a meaningful value. */
1994 +static security_context_t context=NULL;
1996 static struct option const longopts[] =
1998 + {"context", no_argument, NULL, 'Z'},
1999 {"group", no_argument, NULL, 'g'},
2000 {"groups", no_argument, NULL, 'G'},
2001 {"name", no_argument, NULL, 'n'},
2003 Print information for USERNAME, or the current user.\n\
2005 -a ignore, for compatibility with other versions\n\
2006 + -Z, --context print only the context\n\
2007 -g, --group print only the effective group ID\n\
2008 -G, --groups print all group IDs\n\
2009 -n, --name print a name instead of a number, for -ugG\n\
2011 main (int argc, char **argv)
2014 + int selinux_enabled=(is_selinux_enabled()>0);
2016 /* If nonzero, output the list of all group IDs. -G */
2017 int just_group_list = 0;
2020 atexit (close_stdout);
2022 - while ((optc = getopt_long (argc, argv, "agnruG", longopts, NULL)) != -1)
2023 + while ((optc = getopt_long (argc, argv, "agnruGZ", longopts, NULL)) != -1)
2027 @@ -136,6 +158,16 @@
2029 /* Ignore -a, for compatibility with SVR4. */
2031 +#ifdef WITH_SELINUX
2033 + /* politely decline if we're not on a selinux-enabled kernel. */
2034 + if( !selinux_enabled ) {
2035 + fprintf( stderr, _("Sorry, --context (-Z) can be used only on a SELinux-enabled kernel.\n") );
2044 @@ -158,8 +192,28 @@
2048 - if (just_user + just_group + just_group_list > 1)
2049 - error (EXIT_FAILURE, 0, _("cannot print only user and only group"));
2050 +#ifdef WITH_SELINUX
2051 + if (argc - optind == 1)
2052 + selinux_enabled = 0;
2054 + if( just_context && !selinux_enabled)
2056 +cannot display context when SELinux not enabled or when displaying the id\n\
2057 +of a different user"));
2059 + /* If we are on a selinux-enabled kernel, get our context. *
2060 + * Otherwise, leave the context variable alone - it has *
2061 + * been initialized known invalid value; if we see this invalid *
2062 + * value later, we will know we are on a non-selinux kernel. */
2063 + if( selinux_enabled )
2065 + if (getcon(&context))
2066 + error (1, 0, _("can't get process context"));
2070 + if (just_user + just_group + just_group_list + just_context > 1)
2071 + error (EXIT_FAILURE, 0, _("cannot print \"only\" of more than one choice"));
2073 if (just_user + just_group + just_group_list == 0 && (use_real || use_name))
2074 error (EXIT_FAILURE, 0,
2075 @@ -190,6 +242,10 @@
2076 print_group (use_real ? rgid : egid);
2077 else if (just_group_list)
2078 print_group_list (argv[optind]);
2079 +#ifdef WITH_SELINUX
2080 + else if (just_context)
2081 + print_context (context);
2084 print_full_info (argv[optind]);
2089 #endif /* HAVE_GETGROUPS */
2090 +#ifdef WITH_SELINUX
2091 + if ( context != NULL ) {
2092 + printf(_(" context=%s"),context);
2096 --- coreutils-5.2.1/src/mv.c.selinux 2004-03-16 14:25:05.401544360 -0500
2097 +++ coreutils-5.2.1/src/mv.c 2004-03-16 14:25:25.906427144 -0500
2102 +#ifdef WITH_SELINUX
2103 +#include <selinux/selinux.h> /* for is_selinux_enabled() */
2104 +int selinux_enabled=0;
2107 /* The official name of this program (e.g., no `g' prefix). */
2108 #define PROGRAM_NAME "mv"
2111 x->preserve_links = 1;
2112 x->preserve_mode = 1;
2113 x->preserve_timestamps = 1;
2114 +#ifdef WITH_SELINUX
2115 + x->preserve_security_context = 1;
2117 x->require_preserve = 0; /* FIXME: maybe make this an option */
2119 x->sparse_mode = SPARSE_AUTO; /* FIXME: maybe make this an option */
2120 @@ -376,6 +384,10 @@
2122 cp_option_init (&x);
2124 +#ifdef WITH_SELINUX
2125 + selinux_enabled= (is_selinux_enabled()>0);
2128 /* FIXME: consider not calling getenv for SIMPLE_BACKUP_SUFFIX unless
2129 we'll actually use backup_suffix_string. */
2130 backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
2131 --- /dev/null 2004-02-23 16:02:56.000000000 -0500
2132 +++ coreutils-5.2.1/src/runcon.c 2004-03-16 14:25:05.701498760 -0500
2135 + * runcon [ context |
2136 + * ( [ -r role ] [-t type] [ -u user ] [ -l levelrange ] )
2137 + * command [arg1 [arg2 ...] ]
2139 + * attempt to run the specified command with the specified context.
2141 + * -r role : use the current context with the specified role
2142 + * -t type : use the current context with the specified type
2143 + * -u user : use the current context with the specified user
2144 + * -l level : use the current context with the specified level range
2146 + * Contexts are interpreted as follows:
2149 + * components system?
2153 + * 3 Y role:type:range
2154 + * 3 N user:role:type
2155 + * 4 Y user:role:type:range
2159 +#include <config.h>
2160 +#include <unistd.h>
2162 +#include <getopt.h>
2163 +#include <selinux/context.h>
2164 +#include <selinux/selinux.h>
2166 +#include "system.h"
2169 +/* The name the program was run with. */
2170 +char *program_name;
2175 + printf(_("Usage: %s [OPTION]... command [args]\n"
2176 + "Run a program in a different security context.\n\n"
2177 + " context Complete security context\n"
2178 + " -t type (for same role as parent)\n"
2179 + " -u user identity\n"
2181 + " -l levelrange\n"
2182 + " --help display this help and exit\n"),
2188 +main(int argc,char **argv,char **envp )
2194 + char *context = NULL;
2195 + security_context_t cur_context = NULL;
2199 + program_name = argv[0];
2200 + setlocale (LC_ALL, "");
2201 + bindtextdomain (PACKAGE, LOCALEDIR);
2202 + textdomain (PACKAGE);
2206 + int this_option_optind = optind ? optind : 1;
2207 + int option_index = 0;
2208 + static struct option long_options[] = {
2209 + { "role", 1, 0, 'r' },
2210 + { "type", 1, 0, 't' },
2211 + { "user", 1, 0, 'u' },
2212 + { "range", 1, 0, 'l' },
2213 + { "help", 0, 0, '?' },
2216 + c = getopt_long(argc, argv, "s:r:t:u:l:?", long_options, &option_index);
2223 + fprintf(stderr,_("multiple roles\n"));
2230 + fprintf(stderr,_("multiple types\n"));
2237 + fprintf(stderr,_("multiple users\n"));
2244 + fprintf(stderr,_("multiple levelranges\n"));
2250 + fprintf(stderr,_("unrecognised option %c\n"),c);
2256 + if ( !(user || role || type || range)) {
2257 + if ( optind >= argc ) {
2258 + usage(_("must specify -t, -u, -l, -r, or context"));
2260 + context = argv[optind++];
2263 + if ( optind >= argc ) {
2264 + usage(_("no command found"));
2268 + con = context_new(context);
2270 + fprintf(stderr,_("%s is not a valid context\n"), context);
2275 + getcon(&cur_context);
2276 + con = context_new(cur_context);
2278 + fprintf(stderr,_("%s is not a valid context\n"), context);
2282 + context_user_set(con,user);
2285 + context_type_set(con,type);
2288 + context_range_set(con,range);
2291 + context_role_set(con,role);
2295 + if (setexeccon(context_str(con))!=0) {
2296 + fprintf(stderr,_("unable to setup security context %s\n"), context_str(con));
2299 + if (cur_context!=NULL)
2300 + freecon(cur_context);
2302 + if ( execvp(argv[optind],argv+optind) ) {
2306 + return 1; /* can't reach this statement.... */
2308 --- coreutils-5.2.1/src/install.c.selinux 2004-03-16 14:25:05.408543296 -0500
2309 +++ coreutils-5.2.1/src/install.c 2004-03-16 14:25:05.704498304 -0500
2311 # include <sys/wait.h>
2314 +#ifdef WITH_SELINUX
2315 +#include <selinux/selinux.h> /* for is_selinux_enabled() */
2316 +int selinux_enabled=0;
2319 struct passwd *getpwnam ();
2320 struct group *getgrnam ();
2322 @@ -123,11 +128,17 @@
2323 static struct option const long_options[] =
2325 {"backup", optional_argument, NULL, 'b'},
2326 +#ifdef WITH_SELINUX
2327 + {"context", required_argument, NULL, 'Z'},
2329 {"directory", no_argument, NULL, 'd'},
2330 {"group", required_argument, NULL, 'g'},
2331 {"mode", required_argument, NULL, 'm'},
2332 {"owner", required_argument, NULL, 'o'},
2333 {"preserve-timestamps", no_argument, NULL, 'p'},
2334 +#ifdef WITH_SELINUX
2335 + {"preserve_context", no_argument, NULL, 'P'},
2337 {"strip", no_argument, NULL, 's'},
2338 {"suffix", required_argument, NULL, 'S'},
2339 {"version-control", required_argument, NULL, 'V'}, /* Deprecated. FIXME. */
2344 +#ifdef WITH_SELINUX
2345 + x->preserve_security_context = 0;
2347 x->dest_info = NULL;
2350 @@ -261,6 +275,11 @@
2351 struct cp_options x;
2354 +#ifdef WITH_SELINUX
2355 + security_context_t scontext = NULL;
2356 + /* set iff kernel has extra selinux system calls */
2357 + selinux_enabled = (is_selinux_enabled()>0);
2360 initialize_main (&argc, &argv);
2361 program_name = argv[0];
2362 @@ -282,7 +301,11 @@
2363 we'll actually use backup_suffix_string. */
2364 backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
2366 +#ifdef WITH_SELINUX
2367 + while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPvV:S:Z:", long_options,
2369 while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pvV:S:", long_options,
2374 @@ -335,6 +358,37 @@
2376 backup_suffix_string = optarg;
2378 +#ifdef WITH_SELINUX
2380 + /* politely decline if we're not on a selinux-enabled kernel. */
2381 + if( !selinux_enabled ) {
2382 + fprintf( stderr, _("Warning: ignoring --preserve_context (-P) because the kernel is not SELinux-enabled.\n") );
2385 + if ( scontext!=NULL ) { /* scontext could be NULL because of calloc() failure */
2386 + (void) fprintf(stderr, _("%s: cannot force target context to '%s' and preserve it\n"), argv[0], scontext);
2389 + x.preserve_security_context = 1;
2392 + /* politely decline if we're not on a selinux-enabled kernel. */
2393 + if( !selinux_enabled) {
2394 + fprintf( stderr, _("Warning: ignoring --context (-Z) because the kernel is not SELinux-enabled.\n") );
2397 + if ( x.preserve_security_context ) {
2399 + (void) fprintf(stderr, _("%s: cannot force target context == '%s' and preserve it\n"), argv[0], optarg);
2402 + scontext = optarg;
2403 + if (setfscreatecon(scontext)) {
2404 + (void) fprintf(stderr, _("%s: cannot setup default context == '%s'\n"), argv[0], scontext);
2409 case_GETOPT_HELP_CHAR;
2410 case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
2412 @@ -716,6 +770,11 @@
2413 -S, --suffix=SUFFIX override the usual backup suffix\n\
2414 -v, --verbose print the name of each directory as it is created\n\
2417 + -P, --preserve_context (SELinux) Preserve security context\n\
2418 + -Z, --context=CONTEXT (SELinux) Set security context of files and directories\n\
2421 fputs (HELP_OPTION_DESCRIPTION, stdout);
2422 fputs (VERSION_OPTION_DESCRIPTION, stdout);
2424 --- coreutils-5.0/po/POTFILES.in.orig 2003-12-29 00:25:44.000000000 +0100
2425 +++ coreutils-5.0/po/POTFILES.in 2003-12-29 00:27:23.176769816 +0100
2442 --- coreutils-5.2.1/po/pl.po.orig Wed Apr 28 14:28:18 2004
2443 +++ coreutils-5.2.1/po/pl.po Wed Apr 28 15:15:40 2004
2444 @@ -158,12 +158,12 @@
2445 msgid "failed to return to initial working directory"
2446 msgstr "nie uda³o siê wróciæ do pocz±tkowego katalogu roboczego"
2448 -#: lib/makepath.c:152 src/copy.c:1343 src/mkdir.c:171
2449 +#: lib/makepath.c:152 src/copy.c:1351 src/mkdir.c:200
2451 msgid "cannot create directory %s"
2452 msgstr "nie mo¿na utworzyæ katalogu %s"
2454 -#: lib/makepath.c:158 lib/makepath.c:400 src/cp.c:435 src/cp.c:457
2455 +#: lib/makepath.c:158 lib/makepath.c:400 src/cp.c:505 src/cp.c:527
2457 msgid "%s exists but is not a directory"
2458 msgstr "%s istnieje, ale nie jest katalogiem"
2460 msgid "cannot chdir to directory %s"
2461 msgstr "nie mo¿na przej¶æ do katalogu %s"
2463 -#: lib/makepath.c:371 lib/makepath.c:386 lib/makepath.c:425 src/install.c:474
2464 +#: lib/makepath.c:371 lib/makepath.c:386 lib/makepath.c:425 src/install.c:616
2466 msgid "cannot change permissions of %s"
2467 msgstr "nie mo¿na zmieniæ uprawnieñ do %s"
2468 @@ -390,25 +390,25 @@
2469 msgid "The strings compared were %s and %s."
2470 msgstr "Porównywane ³añcuchy znaków do %s i %s."
2472 -#: src/basename.c:49 src/cat.c:87 src/chgrp.c:115 src/chmod.c:266
2473 -#: src/chown.c:90 src/chroot.c:41 src/cksum.c:277 src/comm.c:68 src/cp.c:154
2474 -#: src/csplit.c:1401 src/cut.c:178 src/date.c:114 src/dd.c:283 src/df.c:723
2475 -#: src/dircolors.c:100 src/dirname.c:41 src/du.c:163 src/echo.c:72
2476 -#: src/env.c:114 src/expand.c:104 src/expr.c:98 src/factor.c:69 src/fmt.c:267
2477 -#: src/fold.c:62 src/head.c:109 src/hostid.c:42 src/hostname.c:62 src/id.c:82
2478 -#: src/install.c:588 src/join.c:154 src/kill.c:90 src/link.c:47 src/ln.c:341
2479 -#: src/logname.c:44 src/ls.c:3901 src/md5sum.c:120 src/mkdir.c:57
2480 -#: src/mkfifo.c:51 src/mknod.c:51 src/mv.c:301 src/nice.c:65 src/nl.c:172
2481 -#: src/nohup.c:50 src/od.c:282 src/paste.c:392 src/pathchk.c:136
2482 -#: src/pinky.c:464 src/pr.c:2748 src/printenv.c:62 src/printf.c:91
2483 -#: src/ptx.c:1870 src/pwd.c:41 src/readlink.c:63 src/rm.c:103 src/rmdir.c:143
2484 -#: src/seq.c:78 src/setuidgid.c:46 src/shred.c:155 src/sleep.c:48
2485 -#: src/sort.c:272 src/split.c:96 src/stat.c:697 src/stty.c:485 src/su.c:432
2486 -#: src/sum.c:55 src/sync.c:40 src/tac.c:122 src/tail.c:234 src/tee.c:58
2487 -#: src/test.c:971 src/touch.c:244 src/tr.c:316 src/tsort.c:92 src/tty.c:64
2488 -#: src/uname.c:105 src/unexpand.c:373 src/uniq.c:130 src/unlink.c:47
2489 -#: src/uptime.c:189 src/users.c:115 src/wc.c:131 src/who.c:616 src/whoami.c:49
2491 +#: src/basename.c:49 src/cat.c:87 src/chcon.c:288 src/chgrp.c:115
2492 +#: src/chmod.c:266 src/chown.c:90 src/chroot.c:41 src/cksum.c:277
2493 +#: src/comm.c:68 src/cp.c:163 src/csplit.c:1401 src/cut.c:178 src/date.c:114
2494 +#: src/dd.c:283 src/df.c:723 src/dircolors.c:100 src/dirname.c:41 src/du.c:163
2495 +#: src/echo.c:72 src/env.c:114 src/expand.c:104 src/expr.c:98 src/factor.c:69
2496 +#: src/fmt.c:267 src/fold.c:62 src/head.c:109 src/hostid.c:42
2497 +#: src/hostname.c:62 src/id.c:102 src/install.c:730 src/join.c:154
2498 +#: src/kill.c:90 src/link.c:47 src/ln.c:341 src/logname.c:44 src/ls.c:4013
2499 +#: src/md5sum.c:120 src/mkdir.c:64 src/mkfifo.c:58 src/mknod.c:58 src/mv.c:303
2500 +#: src/nice.c:65 src/nl.c:172 src/nohup.c:50 src/od.c:282 src/paste.c:392
2501 +#: src/pathchk.c:136 src/pinky.c:464 src/pr.c:2748 src/printenv.c:62
2502 +#: src/printf.c:91 src/ptx.c:1870 src/pwd.c:41 src/readlink.c:63 src/rm.c:103
2503 +#: src/rmdir.c:143 src/seq.c:78 src/setuidgid.c:46 src/shred.c:155
2504 +#: src/sleep.c:48 src/sort.c:272 src/split.c:96 src/stat.c:777 src/stty.c:485
2505 +#: src/su.c:610 src/sum.c:55 src/sync.c:40 src/tac.c:122 src/tail.c:234
2506 +#: src/tee.c:58 src/test.c:971 src/touch.c:244 src/tr.c:316 src/tsort.c:92
2507 +#: src/tty.c:64 src/uname.c:107 src/unexpand.c:373 src/uniq.c:130
2508 +#: src/unlink.c:47 src/uptime.c:189 src/users.c:115 src/wc.c:131 src/who.c:616
2509 +#: src/whoami.c:49 src/yes.c:42
2511 msgid "Try `%s --help' for more information.\n"
2512 msgstr "Spróbuj `%s --help' dla uzyskania informacji.\n"
2513 @@ -433,22 +433,22 @@
2516 #: src/basename.c:65 src/cat.c:123 src/chgrp.c:163 src/chmod.c:298
2517 -#: src/chown.c:152 src/chroot.c:59 src/cksum.c:292 src/comm.c:93 src/cp.c:251
2518 +#: src/chown.c:152 src/chroot.c:59 src/cksum.c:292 src/comm.c:93 src/cp.c:264
2519 #: src/csplit.c:1443 src/cut.c:223 src/date.c:216 src/dd.c:341 src/df.c:762
2520 #: src/dircolors.c:121 src/dirname.c:57 src/du.c:216 src/echo.c:104
2521 #: src/env.c:133 src/expand.c:129 src/expr.c:161 src/factor.c:89
2522 #: src/false.c:43 src/fmt.c:297 src/fold.c:85 src/head.c:144 src/hostid.c:55
2523 -#: src/hostname.c:75 src/id.c:103 src/install.c:643 src/join.c:195
2524 -#: src/kill.c:120 src/link.c:59 src/ln.c:398 src/logname.c:55 src/ls.c:4035
2525 -#: src/md5sum.c:156 src/mkdir.c:76 src/mkfifo.c:68 src/mknod.c:82 src/mv.c:355
2526 +#: src/hostname.c:75 src/id.c:124 src/install.c:793 src/join.c:195
2527 +#: src/kill.c:120 src/link.c:59 src/ln.c:398 src/logname.c:55 src/ls.c:4157
2528 +#: src/md5sum.c:156 src/mkdir.c:88 src/mkfifo.c:80 src/mknod.c:94 src/mv.c:357
2529 #: src/nice.c:79 src/nl.c:227 src/nohup.c:66 src/od.c:369 src/paste.c:416
2530 #: src/pathchk.c:148 src/pinky.c:491 src/pr.c:2860 src/printenv.c:75
2531 #: src/printf.c:140 src/ptx.c:1917 src/pwd.c:52 src/readlink.c:80 src/rm.c:141
2532 #: src/rmdir.c:163 src/seq.c:106 src/setuidgid.c:66 src/shred.c:219
2533 -#: src/sleep.c:64 src/sort.c:343 src/split.c:129 src/stat.c:768 src/stty.c:699
2534 -#: src/su.c:453 src/sum.c:75 src/sync.c:51 src/tac.c:145 src/tail.c:304
2535 +#: src/sleep.c:64 src/sort.c:343 src/split.c:129 src/stat.c:850 src/stty.c:699
2536 +#: src/su.c:631 src/sum.c:75 src/sync.c:51 src/tac.c:145 src/tail.c:304
2537 #: src/tee.c:71 src/test.c:1050 src/touch.c:275 src/tr.c:389 src/true.c:43
2538 -#: src/tsort.c:104 src/tty.c:76 src/uname.c:127 src/unexpand.c:397
2539 +#: src/tsort.c:104 src/tty.c:76 src/uname.c:129 src/unexpand.c:397
2540 #: src/uniq.c:169 src/unlink.c:58 src/uptime.c:204 src/users.c:128
2541 #: src/wc.c:153 src/who.c:657 src/whoami.c:61 src/yes.c:58
2543 @@ -459,19 +459,20 @@
2545 "Raporty o b³êdach wysy³aj do %s .\n"
2547 -#: src/basename.c:114 src/chgrp.c:246 src/chmod.c:395 src/chown.c:264
2548 -#: src/chroot.c:80 src/comm.c:288 src/csplit.c:1373 src/dirname.c:89
2549 -#: src/expr.c:199 src/install.c:281 src/link.c:88 src/mkdir.c:125
2550 -#: src/mkfifo.c:114 src/mknod.c:138 src/nohup.c:100 src/pathchk.c:189
2551 -#: src/readlink.c:128 src/rm.c:231 src/rmdir.c:208 src/seq.c:374
2552 -#: src/setuidgid.c:99 src/sleep.c:140 src/stat.c:825 src/unlink.c:89
2553 +#: src/basename.c:114 src/chcon.c:401 src/chgrp.c:246 src/chmod.c:395
2554 +#: src/chown.c:264 src/chroot.c:80 src/comm.c:288 src/csplit.c:1373
2555 +#: src/dirname.c:89 src/expr.c:199 src/install.c:417 src/link.c:88
2556 +#: src/mkdir.c:154 src/mkfifo.c:142 src/mknod.c:167 src/nohup.c:100
2557 +#: src/pathchk.c:189 src/readlink.c:128 src/rm.c:231 src/rmdir.c:208
2558 +#: src/seq.c:374 src/setuidgid.c:99 src/sleep.c:140 src/stat.c:916
2560 msgid "too few arguments"
2561 msgstr "za ma³o argumentów"
2563 #: src/basename.c:115 src/dircolors.c:475 src/dirname.c:90 src/hostid.c:78
2564 -#: src/hostname.c:122 src/link.c:94 src/logname.c:91 src/mknod.c:140
2565 +#: src/hostname.c:122 src/link.c:94 src/logname.c:91 src/mknod.c:169
2566 #: src/readlink.c:136 src/seq.c:380 src/split.c:533 src/tr.c:1842
2567 -#: src/uname.c:215 src/unlink.c:95 src/uptime.c:247 src/users.c:171
2568 +#: src/uname.c:217 src/unlink.c:95 src/uptime.c:247 src/users.c:171
2570 msgid "too many arguments"
2571 msgstr "za du¿o argumentów"
2572 @@ -554,6 +555,95 @@
2573 msgid "closing standard output"
2574 msgstr "zamkniêcie standardowego wyj¶cia"
2578 +msgid "context of %s changed to %s\n"
2579 +msgstr "kontekst %s zmieniony na %s\n"
2583 +msgid "failed to change context of %s to %s\n"
2584 +msgstr "nie mo¿na zmieniæ kontekstu %s na %s\n"
2588 +msgid "context of %s retained as %s\n"
2589 +msgstr "kontekst %s zachowany jako %s\n"
2593 +msgid "can't apply partial context to unlabeled file %s"
2594 +msgstr "nie mo¿na zastosowaæ czê¶ciowego kontekstu na nieoznakowanym pliku %s"
2598 +msgid "couldn't compute security context from %s"
2599 +msgstr "nie mo¿na obliczyæ kontekstu bezpieczeñstwa z %s"
2603 +msgid "invalid context: %s"
2604 +msgstr "b³êdny kontekst: %s"
2608 +msgid "failed to change context of %s to %s"
2609 +msgstr "nie mo¿na zmieniæ kontekstu %s na %s"
2612 +msgid "virtual memory exhausted"
2613 +msgstr "pamiêæ wirtualna wyczerpana"
2618 +"Usage: %s [OPTION]... CONTEXT FILE...\n"
2619 +" or: %s [OPTION]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE...\n"
2620 +" or: %s [OPTION]... --reference=RFILE FILE...\n"
2622 +"Sk³adnia: %s [OPCJA]... KONTEKST PLIK...\n"
2623 +" albo: %s [OPCJA]... [-u U¯YTKOWNIK] [-r ROLA] [-l ZAKRES] [-t TYP] PLIK...\n"
2624 +" albo: %s [OPCJA]... --reference=PLIK_WZ PLIK...\n"
2629 +"Change the security context of each FILE to CONTEXT.\n"
2631 +" -c, --changes like verbose but report only when a change is made\n"
2632 +" -h, --no-dereference affect symbolic links instead of any referenced file\n"
2633 +" (available only on systems with lchown system call)\n"
2634 +" -f, --silent, --quiet suppress most error messages\n"
2635 +" --reference=RFILE use RFILE's group instead of using a CONTEXT value\n"
2636 +" -u, --user=USER set user USER in the target security context\n"
2637 +" -r, --role=ROLE set role ROLE in the target security context\n"
2638 +" -t, --type=TYPE set type TYPE in the target security context\n"
2639 +" -l, --range=RANGE set range RANGE in the target security context\n"
2640 +" -R, --recursive change files and directories recursively\n"
2641 +" -v, --verbose output a diagnostic for every file processed\n"
2642 +" --help display this help and exit\n"
2643 +" --version output version information and exit\n"
2645 +"Zmiana kontekstu bezpieczeñstwa ka¿dego PLIKU na KONTEKST.\n"
2647 +" -c, --changes jak verbose, ale raportowanie tylko wykonanych zmian\n"
2648 +" -h, --no-dereference zmiana dowi±zañ symbolicznych zamiast wskazywanych\n"
2649 +" plików (dostêpne tylko na systemach z lchown)\n"
2650 +" -f, --silent, --quiet pominiêcie wiêkszo¶ci komunikatów o b³êdach\n"
2651 +" --reference=PLIK u¿ycie grupy PLIKU zamiast warto¶ci KONTEKSTU\n"
2652 +" -u, --user=U¯YTKOWNIK ustawienie U¯YTKOWNIK w kontek¶cie bezpieczeñstwa\n"
2653 +" -r, --role=ROLA ustawienie ROLI w kontek¶cie bezpieczeñstwa\n"
2654 +" -t, --type=TYP ustawienie TYPU w kontek¶cie bezpieczeñstwa\n"
2655 +" -l, --range=ZAKRES ustawienie ZAKRESU w kontek¶cie bezpieczeñstwa\n"
2656 +" -R, --recursive zmiana plików i katalogów rekursywnie\n"
2657 +" -v, --verbose wypisywanie diagnostyki dla ka¿dego pliku\n"
2658 +" --help wy¶wietlenie tego opisu i zakoñczenie\n"
2659 +" --version wy¶wietlenie informacji o wersji i zakoñczenie\n"
2662 +msgid "conflicting security context specifiers given"
2663 +msgstr "konflikt miêdzy podanymi okre¶leniami kontekstu bezpieczeñstwa"
2666 msgid "cannot change to null group"
2667 msgstr "nie mo¿na zmieniæ grupy na pust±"
2671 #: src/chgrp.c:254 src/chmod.c:408 src/chmod.c:416 src/chown.c:272
2672 -#: src/chown.c:299 src/cp.c:296 src/rm.c:241 src/touch.c:164 src/touch.c:366
2673 +#: src/chown.c:299 src/cp.c:309 src/cp.c:445 src/cp.c:469 src/rm.c:241
2674 +#: src/touch.c:164 src/touch.c:366
2676 msgid "failed to get attributes of %s"
2677 msgstr "nie uda³o siê odczytaæ atrybutów %s"
2679 msgid "mode of %s retained as %04lo (%s)\n"
2680 msgstr "uprawnienia do %s zachowane jako %04lo (%s)\n"
2682 -#: src/chmod.c:167 src/chown-core.c:189 src/copy.c:158 src/du.c:341
2683 +#: src/chmod.c:167 src/chown-core.c:189 src/copy.c:143 src/du.c:341
2685 msgid "cannot access %s"
2686 msgstr "nie ma dostêpu do %s"
2687 @@ -991,250 +1082,266 @@
2688 " -2 bez pokazania linii, które s± tylko w PLIKU2\n"
2689 " -3 bez pokazania linii, które s± w obu plikach\n"
2691 -#: src/copy.c:222 src/fmt.c:435 src/head.c:866 src/tail.c:1268
2692 +#: src/copy.c:207 src/fmt.c:435 src/head.c:866 src/tail.c:1268
2694 msgid "cannot open %s for reading"
2695 msgstr "nie mo¿na otworzyæ %s do czytania"
2697 -#: src/copy.c:228 src/copy.c:282 src/copy.c:302 src/dd.c:1209 src/tail.c:1098
2698 +#: src/copy.c:213 src/copy.c:267 src/copy.c:287 src/dd.c:1209 src/tail.c:1098
2701 msgid "cannot fstat %s"
2702 msgstr "nie mo¿na wykonaæ fstat na %s"
2707 msgid "skipping file %s, as it was replaced while being copied"
2708 msgstr "plik %s zosta³ ominiêty, bo zosta³ zmieniony w trakcie kopiowania"
2710 -#: src/copy.c:258 src/copy.c:892 src/copy.c:1076 src/copy.c:1179 src/ln.c:297
2711 +#: src/copy.c:243 src/copy.c:875 src/copy.c:1059 src/copy.c:1162 src/ln.c:297
2712 #: src/remove.c:727 src/remove.c:781 src/remove.c:902 src/remove.c:1009
2714 msgid "cannot remove %s"
2715 msgstr "nie mo¿na usun±æ %s"
2720 msgid "cannot create regular file %s"
2721 msgstr "nie mo¿na utworzyæ zwyk³ego pliku %s"
2723 -#: src/copy.c:329 src/dd.c:825 src/dd.c:1019
2724 +#: src/copy.c:314 src/dd.c:825 src/dd.c:1019
2727 msgstr "czytanie %s"
2729 -#: src/copy.c:363 src/head.c:437
2730 +#: src/copy.c:348 src/head.c:437
2732 msgid "cannot lseek %s"
2733 msgstr "nie mo¿na wykonaæ lseek na %s"
2735 -#: src/copy.c:378 src/copy.c:402 src/dd.c:1063 src/dd.c:1124
2736 +#: src/copy.c:363 src/copy.c:387 src/dd.c:1063 src/dd.c:1124
2741 -#: src/copy.c:410 src/copy.c:416 src/head.c:874
2742 +#: src/copy.c:395 src/copy.c:401 src/head.c:874
2745 msgstr "zamykanie %s"
2750 msgid "%s: overwrite %s, overriding mode %04lo? "
2751 msgstr "%s: zamazanie %s, obej¶æ uprawnienia %04lo? "
2756 msgid "%s: overwrite %s? "
2757 msgstr "%s: zamazaæ %s? "
2759 -#: src/copy.c:836 src/copy.c:874 src/df.c:492 src/stat.c:655
2760 +#: src/copy.c:821 src/copy.c:857 src/copy.c:1362 src/copy.c:1614 src/df.c:492
2763 msgid "cannot stat %s"
2764 msgstr "nie mo¿na wykonaæ stat na %s"
2769 msgid "omitting directory %s"
2770 msgstr "katalog %s zosta³ pominiêty"
2775 msgid "warning: source file %s specified more than once"
2776 msgstr "uwaga: plik ¼ród³owy %s pojawi³ siê wiêcej ni¿ raz"
2778 -#: src/copy.c:905 src/ln.c:241
2779 +#: src/copy.c:888 src/ln.c:241
2781 msgid "%s and %s are the same file"
2782 msgstr "%s i %s to ten sam plik"
2787 msgid "cannot overwrite non-directory %s with directory %s"
2788 msgstr "nie mo¿na zamazaæ nie-katalogu %s katalogiem %s"
2793 msgid "will not overwrite just-created %s with %s"
2794 msgstr "nie mo¿na zamazaæ w³a¶nie utworzonego %s plikiem %s"
2799 msgid "cannot overwrite directory %s with non-directory"
2800 msgstr "nie mo¿na zamazaæ katalogu %s nie-katalogiem"
2805 msgid "cannot overwrite directory %s"
2806 msgstr "nie mo¿na zamazaæ katalogu %s"
2811 msgid "cannot move directory onto non-directory: %s -> %s"
2812 msgstr "nie mo¿na przenie¶æ katalogu do nie-katalogu: %s -> %s"
2817 msgid "backing up %s would destroy source; %s not moved"
2819 "utworzenie kopii zapasowej %s zniszczy³oby ¿ród³o; %s nie zosta³ "
2825 msgid "backing up %s would destroy source; %s not copied"
2827 "utworzenie kopii zapasowej %s zniszczy³oby ¿ród³o; %s nie zosta³ skopiowany"
2829 -#: src/copy.c:1055 src/ln.c:279
2830 +#: src/copy.c:1038 src/ln.c:279
2832 msgid "cannot backup %s"
2833 msgstr "nie mo¿na utworzyæ kopii zapasowej %s"
2835 -#: src/copy.c:1091 src/ln.c:314
2836 +#: src/copy.c:1074 src/ln.c:314
2838 msgid " (backup: %s)"
2839 msgstr " (kopia zapasowa: %s)"
2844 msgid "cannot copy a directory, %s, into itself, %s"
2845 msgstr "nie mo¿na skopiowaæ katalogu %s do siebie samego %s"
2850 msgid "will not create hard link %s to directory %s"
2851 msgstr "nie mo¿na utworzyæ dowi±zania zwyk³ego %s do katalogu %s"
2856 msgid "cannot create hard link %s to %s"
2857 msgstr "nie mo¿na utworzyæ dowi±zania zwyk³ego %s do %s"
2862 msgid "cannot move %s to a subdirectory of itself, %s"
2863 msgstr "nie mo¿na przenie¶æ %s do w³asnego podkatalogu %s"
2868 msgid "cannot move %s to %s"
2869 msgstr "nie mo¿na przenie¶æ %s do %s"
2874 msgid "inter-device move failed: %s to %s; unable to remove target"
2876 "nie uda³o siê przeniesienie miêdzy urz±dzeniami: %s do %s; nie uda³o siê "
2877 "usunaæ pliku docelowego"
2882 +msgid "cannot set setfscreatecon %s"
2883 +msgstr "nie mo¿na ustawiæ setfscreatecon %s"
2887 +msgid "warning: security context not preserved %s"
2888 +msgstr "uwaga: nie zachowano kontekstu bezpieczeñstwa %s"
2892 +msgid "cannot lgetfilecon %s"
2893 +msgstr "nie mo¿na wykonaæ lgetfilecon %s"
2897 msgid "cannot copy cyclic symbolic link %s"
2898 msgstr "nie mo¿na skopiowaæ cyklicznego dowi±zania symbolicznego %s"
2901 +#: src/copy.c:1375 src/cp.c:496
2903 +msgid "setting permissions for %s"
2904 +msgstr "nie mo¿na ustawiæ uprawnieñ do %s"
2908 msgid "%s: can make relative symbolic links only in current directory"
2910 "%s: mo¿na zrobiæ tylko wzglêdne dowi±zanie symboliczne w bie¿±cym katalogu"
2915 msgid "cannot create symbolic link %s to %s"
2916 msgstr "nie mo¿na utworzyæ dowi±zania symbolicznego %s do %s"
2921 msgid "cannot create link %s"
2922 msgstr "nie mo¿na utworzyæ dowi±zania %s"
2924 -#: src/copy.c:1441 src/mkfifo.c:134
2925 +#: src/copy.c:1478 src/mkfifo.c:162
2927 msgid "cannot create fifo %s"
2928 msgstr "nie mo¿na utworzyæ potoku %s"
2933 msgid "cannot create special file %s"
2934 msgstr "nie mo¿na utworzyæ pliku specjalnego %s"
2936 -#: src/copy.c:1464 src/ls.c:2554 src/stat.c:439
2937 +#: src/copy.c:1501 src/ls.c:2648 src/stat.c:450
2939 msgid "cannot read symbolic link %s"
2940 msgstr "nie mo¿na przeczytaæ dowi±zania symbolicznego %s"
2945 msgid "cannot create symbolic link %s"
2946 msgstr "nie mo¿na utworzyæ dowi±zania symbolicznego %s"
2948 -#: src/copy.c:1505 src/copy.c:1566 src/cp.c:330
2949 +#: src/copy.c:1547 src/copy.c:1626 src/cp.c:343
2951 msgid "failed to preserve ownership for %s"
2952 msgstr "nie uda³o siê zachowaæ w³asno¶ci %s"
2957 msgid "%s has unknown file type"
2958 msgstr "%s to nieznany typ pliku"
2963 msgid "preserving times for %s"
2964 msgstr "zachowanie czasu %s"
2969 msgid "failed to lookup file %s"
2970 msgstr "nie uda³o siê znale¼æ pliku %s"
2975 msgid "failed to preserve authorship for %s"
2976 msgstr "nie uda³o siê zachowaæ autorstwa %s"
2980 -msgid "setting permissions for %s"
2981 -msgstr "nie mo¿na ustawiæ uprawnieñ do %s"
2986 msgid "preserving permissions for %s"
2987 msgstr "nie mo¿na zachowaæ uprawnieñ do %s"
2989 -#: src/copy.c:1624 src/ln.c:332
2990 +#: src/copy.c:1692 src/ln.c:332
2992 msgid "cannot un-backup %s"
2993 msgstr "nie mo¿na przywróciæ kopii zapasowej %s"
2998 msgid "%s -> %s (unbackup)\n"
2999 msgstr "%s -> %s (przywrócenie kopii zapasowej)\n"
3001 -#: src/cp.c:158 src/mv.c:305
3002 +#: src/cp.c:167 src/mv.c:307
3005 "Usage: %s [OPTION]... SOURCE DEST\n"
3006 @@ -1245,7 +1352,7 @@
3007 " albo: %s [OPCJA]... ¬RÓD£O... KATALOG\n"
3008 " albo: %s [OPCJA]... --target-directory=KATALOG ¬RÓD£O...\n"
3013 "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
3015 @@ -1253,10 +1360,10 @@
3016 "Skopiowanie ¬RÓD£A do CELU lub ¬RÓD£A/¬RÓDE£ do KATALOGU.\n"
3019 -#: src/cp.c:168 src/csplit.c:1414 src/cut.c:190 src/df.c:733 src/du.c:172
3020 +#: src/cp.c:177 src/csplit.c:1414 src/cut.c:190 src/df.c:733 src/du.c:172
3021 #: src/expand.c:117 src/fmt.c:277 src/fold.c:75 src/head.c:123
3022 -#: src/install.c:604 src/kill.c:104 src/ln.c:360 src/ls.c:3911 src/mkdir.c:66
3023 -#: src/mkfifo.c:60 src/mknod.c:61 src/mv.c:315 src/nl.c:185 src/paste.c:406
3024 +#: src/install.c:746 src/kill.c:104 src/ln.c:360 src/ls.c:4023 src/mkdir.c:78
3025 +#: src/mkfifo.c:72 src/mknod.c:73 src/mv.c:317 src/nl.c:185 src/paste.c:406
3026 #: src/pr.c:2761 src/ptx.c:1882 src/shred.c:165 src/sort.c:286 src/split.c:109
3027 #: src/tac.c:135 src/tail.c:248 src/touch.c:253 src/unexpand.c:386
3029 @@ -1265,7 +1372,7 @@
3031 "Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
3036 " -a, --archive same as -dpR\n"
3037 " --backup[=CONTROL] make a backup of each existing destination "
3038 @@ -1285,7 +1392,7 @@
3039 " przypadku rekursji\n"
3040 " -d to samo co --no-dereference --preserve=link\n"
3045 " --no-dereference never follow symbolic links\n"
3046 " -f, --force if an existing destination file cannot be\n"
3047 @@ -1300,7 +1407,7 @@
3048 " -i, --interactive pytanie przed zamazaniem\n"
3049 " -H rozwi±zywanie argumentów - dowi±zañ symb.\n"
3054 " -l, --link link files instead of copying\n"
3055 " -L, --dereference always follow symbolic links\n"
3056 @@ -1321,7 +1428,11 @@
3057 " atrybutów: links (dowi±zania), all "
3062 +msgid " -c same as --preserve=context\n"
3063 +msgstr " -c to samo co --preserve=context\n"
3067 " --no-preserve=ATTR_LIST don't preserve the specified attributes\n"
3068 " --parents append source path to DIRECTORY\n"
3069 @@ -1331,7 +1442,7 @@
3070 " --parents dodanie ¶cie¿ki ¼ród³owej do KATALOGU\n"
3071 " -P to samo co `--no-dereference'\n"
3076 " -R, -r, --recursive copy directories recursively\n"
3077 " --remove-destination remove each existing destination file before\n"
3078 @@ -1343,7 +1454,7 @@
3080 " przed prób± jego otwarcia (por. z --force)\n"
3085 " --reply={yes,no,query} specify how to handle the prompt about an\n"
3086 " existing destination file\n"
3087 @@ -1358,7 +1469,7 @@
3089 " nazw argumentów ¬RÓD£OWYCH\n"
3094 " -s, --symbolic-link make symbolic links instead of copying\n"
3095 " -S, --suffix=SUFFIX override the usual backup suffix\n"
3096 @@ -1370,21 +1481,22 @@
3097 " --target-directory=KATALOG przeniesienie wszystkich ¬RÓDE£ do "
3103 " -u, --update copy only when the SOURCE file is newer\n"
3104 " than the destination file or when the\n"
3105 " destination file is missing\n"
3106 " -v, --verbose explain what is being done\n"
3107 " -x, --one-file-system stay on this file system\n"
3108 +" -Z, --context=CONTEXT set security context of copy to CONTEXT\n"
3110 " -u, --update kopiowanie tylko plików, dla których ¬RÓD£O\n"
3111 " jest nowsze ni¿ CEL albo brakuje CELU\n"
3112 " -v, --verbose wyja¶nianie co siê dzieje\n"
3113 " -x, --one-file-system pozostanie w jednym systemie plików\n"
3115 +" -Z, --context=KONTEKST ustawienie KONTEKSTU bezpieczeñstwa kopii\n"
3121 "By default, sparse SOURCE files are detected by a crude heuristic and the\n"
3122 @@ -1404,7 +1516,7 @@
3123 "U¿yj --sparse=never (nigdy) ¿eby zakazaæ tworzenia plików rzadkich.\n"
3129 "The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n"
3130 "The version control method may be selected via the --backup option or "
3131 @@ -1420,7 +1532,7 @@
3132 "Mo¿liwe warto¶ci:\n"
3135 -#: src/cp.c:239 src/install.c:637 src/ln.c:392 src/mv.c:349
3136 +#: src/cp.c:252 src/install.c:787 src/ln.c:392 src/mv.c:351
3138 " none, off never make backups (even if --backup is given)\n"
3139 " numbered, t make numbered backups\n"
3140 @@ -1434,7 +1546,7 @@
3141 " existing, nil numerowane je¿eli takie ju¿ istniej±, je¿eli nie - proste\n"
3142 " simple, never tworzenie zawsze prostych kopii zapasowych\n"
3148 "As a special case, cp makes a backup of SOURCE when the force and backup\n"
3149 @@ -1446,54 +1558,54 @@
3150 "opcje force i backup, a ¬RÓD£O i CEL s± t± sam± nazw± istniej±cego pliku\n"
3156 msgid "failed to preserve times for %s"
3157 msgstr "nie uda³o siê zachowaæ czasu %s"
3162 msgid "failed to preserve permissions for %s"
3163 msgstr "nie uda³o siê zachowaæ uprawnieñ do %s"
3168 msgid "cannot make directory %s"
3169 msgstr "nie mo¿na utworzyæ katalogu %s"
3171 -#: src/cp.c:482 src/ln.c:496 src/mv.c:454 src/shred.c:1601
3172 +#: src/cp.c:552 src/ln.c:496 src/mv.c:460 src/shred.c:1601
3173 msgid "missing file argument"
3174 msgstr "brakuj±cy argument plikowy"
3178 msgid "missing destination file"
3179 msgstr "brakuj±cy plik docelowy"
3181 -#: src/cp.c:512 src/ln.c:165 src/ln.c:188 src/ln.c:215 src/ln.c:303
3182 +#: src/cp.c:582 src/ln.c:165 src/ln.c:188 src/ln.c:215 src/ln.c:303
3184 msgid "accessing %s"
3185 msgstr "dostêp do %s"
3190 msgid "%s: specified destination directory does not exist"
3191 msgstr "%s: podany katalog docelowy nie istnieje"
3196 msgid "%s: specified target is not a directory"
3197 msgstr "%s: podany CEL nie jest katalogiem"
3202 msgid "copying multiple files, but last argument %s is not a directory"
3203 msgstr "kopiowanie wielu plików, ostatni argument %s nie jest katalogiem"
3207 msgid "when preserving paths, the destination must be a directory"
3208 msgstr "je¿eli s± zachowane ¶cie¿ki, ostatni argument musi byæ katalogiem"
3210 -#: src/cp.c:872 src/install.c:216 src/ln.c:443 src/mv.c:400
3211 +#: src/cp.c:948 src/install.c:318 src/ln.c:443 src/mv.c:406
3214 "warning: --version-control (-V) is obsolete; support for it\n"
3215 @@ -1502,15 +1614,35 @@
3216 "uwaga: opcja --version-control (-V) jest przestarza³a i zostanie usuniêta\n"
3217 "w jednej z nastêpnych wersji. U¿ywaj --backup=%s ."
3219 -#: src/cp.c:966 src/ln.c:473
3222 +msgid "%s: cannot force target context <-- %s and preserve it\n"
3223 +msgstr "%s: nie mo¿na wymusiæ docelowego kontekstu <-- %s i zachowaæ go\n"
3227 +msgid "Warning: ignoring --context (-Z). It requires a SELinux enabled kernel.\n"
3228 +msgstr "Uwaga: zignorowano --context (-Z). Ta opcja wymaga j±dra z obs³ug± SELinuksa.\n"
3230 +#: src/cp.c:1031 src/install.c:369
3232 +msgid "%s: cannot force target context to '%s' and preserve it\n"
3233 +msgstr "%s: nie mo¿na wymusiæ docelowego kontekstu na '%s' i zachowaæ go\n"
3237 +msgid "cannot set default security context %s"
3238 +msgstr "nie mo¿na ustawiæ domy¶lnego kontekstu bezpieczeñstwa %s"
3240 +#: src/cp.c:1071 src/ln.c:473
3241 msgid "symbolic links are not supported on this system"
3242 msgstr "ten system nie ma dowi±zañ symbolicznych"
3246 msgid "cannot make both hard and symbolic links"
3247 msgstr "nie mo¿na zrobiæ dowi±zania symbolicznego i zwyk³ego równocze¶nie"
3249 -#: src/cp.c:1010 src/install.c:272 src/ln.c:539 src/mv.c:478
3250 +#: src/cp.c:1115 src/install.c:408 src/ln.c:539 src/mv.c:484
3252 msgstr "rodzaj kopii zapasowej"
3254 @@ -1707,7 +1839,7 @@
3255 "PRZESUNIÊCIE linii musi siê sk³adaæ z `+' albo `-' oraz liczby ca³kowitej.\n"
3257 #: src/cut.c:182 src/df.c:727 src/du.c:167 src/expand.c:108 src/fold.c:66
3258 -#: src/head.c:113 src/ls.c:3905 src/nl.c:176 src/paste.c:396 src/pr.c:2752
3259 +#: src/head.c:113 src/ls.c:4017 src/nl.c:176 src/paste.c:396 src/pr.c:2752
3260 #: src/sort.c:276 src/sum.c:59 src/tac.c:126 src/tail.c:238 src/tee.c:62
3261 #: src/unexpand.c:377 src/wc.c:135
3263 @@ -2083,7 +2215,7 @@
3264 msgid "time %s is out of range"
3265 msgstr "czas %s jest spoza zakresu"
3267 -#: src/dd.c:287 src/tty.c:68 src/uname.c:109 src/whoami.c:53
3268 +#: src/dd.c:287 src/tty.c:68 src/uname.c:111 src/whoami.c:53
3270 msgid "Usage: %s [OPTION]...\n"
3271 msgstr "Sk³adnia: %s [OPCJA]...\n"
3272 @@ -2381,7 +2513,7 @@
3273 " -x, --exclude-type=TYP pokazanie tylko systemów plików nie tego TYPU\n"
3274 " -v (ignorowane)\n"
3276 -#: src/df.c:758 src/du.c:212 src/ls.c:4023
3277 +#: src/df.c:758 src/du.c:212 src/ls.c:4145
3280 "SIZE may be (or may be an integer optionally followed by) one of following:\n"
3281 @@ -2590,7 +2722,7 @@
3282 " poni¿ej podanego jako argument komendy;\n"
3283 " --max-depth=0 jest tym samym co -summarize\n"
3285 -#: src/du.c:526 src/ls.c:2224 src/wc.c:674
3286 +#: src/du.c:526 src/ls.c:2299 src/wc.c:674
3290 @@ -3036,7 +3168,7 @@
3291 msgid "invalid number of columns: `%s'"
3292 msgstr "b³êdna liczba kolumn: `%s'"
3299 @@ -3206,16 +3338,17 @@
3300 msgid "cannot determine hostname"
3301 msgstr "uzyskanie nazwy systemu jest niemo¿liwe"
3306 msgid "Usage: %s [OPTION]... [USERNAME]\n"
3307 msgstr "Sk³adnia: %s [OPCJA]... [U¯YTKOWNIK]\n"
3312 "Print information for USERNAME, or the current user.\n"
3314 " -a ignore, for compatibility with other versions\n"
3315 +" -Z, --context print only the context\n"
3316 " -g, --group print only the effective group ID\n"
3317 " -G, --groups print all group IDs\n"
3318 " -n, --name print a name instead of a number, for -ugG\n"
3319 @@ -3224,8 +3357,8 @@
3321 "Wy¶wietla informacjê o U¯YTKOWNIKU lub o aktualnym u¿ytkowniku.\n"
3323 -" -a ignorowane, dla zachowania kompatybilno¶ci z innymi "
3325 +" -a ignorowane, dla zachowania kompatybilno¶ci z innymi wersjami\n"
3326 +" -Z, --context wy¶wietlenie tylko kontekstu\n"
3327 " -g, --group wy¶wietlenie tylko efektywnego identyfikatora grupy\n"
3328 " -G, --groups wy¶wietlenie pe³nej listy grup\n"
3329 " -n, --name wy¶wietlenie nazw zamiast numerów, dla -ugG\n"
3330 @@ -3233,7 +3366,7 @@
3332 " -u, --user wy¶wietlenie tylko efektywnego identyfikatora u¿ytkownika\n"
3338 "Without any OPTION, print some useful set of identified information.\n"
3339 @@ -3242,101 +3375,143 @@
3340 "Bez ¿adnych OPCJI wy¶wietla zestaw u¿ytecznych informacji, które uda³o siê\n"
3344 -msgid "cannot print only user and only group"
3345 -msgstr "nie mo¿na wypisaæ tylko u¿ytkownika i tylko grupê równocze¶nie"
3346 +#: src/id.c:165 src/mkdir.c:136 src/mkfifo.c:124 src/mknod.c:135
3348 +msgid "Sorry, --context (-Z) can be used only on a SELinux-enabled kernel.\n"
3349 +msgstr "Niestety --context (-Z) mo¿na u¿ywaæ tylko na j±drze z obs³ug± SELinuksa.\n"
3353 +"cannot display context when SELinux not enabled or when displaying the id\n"
3354 +"of a different user"
3356 +"nie mo¿na wy¶wietliæ kontekstu kiedy SELinux nie jest w³±czony lub przy\n"
3357 +"wy¶wietlaniu identyfikatora innego u¿ytkownika"
3360 +msgid "can't get process context"
3361 +msgstr "nie mo¿na uzyskaæ kontekstu procesu"
3364 +msgid "cannot print \"only\" of more than one choice"
3365 +msgstr "nie mo¿na wypisaæ \"tylko czego¶\" dla wiêcej ni¿ jednej rzeczy"
3369 msgid "cannot print only names or real IDs in default format"
3371 "nie da siê wypisaæ tylko nazw lub rzeczywistych ID w domy¶lnym formacie"
3376 msgid "%s: No such user"
3377 msgstr "%s: Nie ma takiego u¿ytkownika"
3382 msgid "cannot find name for user ID %u"
3383 msgstr "nie mo¿na znale¼æ nazwy u¿ytkownika o ID %u"
3388 msgid "cannot find name for group ID %u"
3389 msgstr "nie mo¿na znale¼æ nazwy grupy o ID %u"
3393 msgid "cannot get supplemental group list"
3394 msgstr "uzyskanie pe³nej listy grup niemo¿liwe"
3401 -#: src/install.c:266
3404 +msgid " context=%s"
3405 +msgstr " kontekst=%s"
3407 +#: src/install.c:365
3409 +msgid "Warning: ignoring --preserve_context (-P) because the kernel is not SELinux-enabled.\n"
3410 +msgstr "Uwaga: zignorowano --preserve_context (-P), poniewa¿ j±dro nie ma obs³ugi SELinuksa.\n"
3412 +#: src/install.c:377
3414 +msgid "Warning: ignoring --context (-Z) because the kernel is not SELinux-enabled.\n"
3415 +msgstr "Uwaga: zignorowano --context (-Z), poniewa¿ j±dro nie ma obs³ugi SELinuksa.\n"
3417 +#: src/install.c:382
3419 +msgid "%s: cannot force target context == '%s' and preserve it\n"
3420 +msgstr "%s: nie mo¿na wymusiæ docelowego kontekstu '%s' i zachowaæ go\n"
3422 +#: src/install.c:387
3424 +msgid "%s: cannot setup default context == '%s'\n"
3425 +msgstr "%s: nie mo¿na ustawiæ domy¶lnego kontekstu '%s'\n"
3427 +#: src/install.c:402
3428 msgid "the strip option may not be used when installing a directory"
3429 msgstr "opcja obcinania (strip) nie mo¿e byæ u¿yta przy instalowaniu katalogu"
3431 -#: src/install.c:289 src/mkdir.c:141
3432 +#: src/install.c:425 src/mkdir.c:170
3434 msgid "invalid mode %s"
3435 msgstr "b³êdne uprawnienia %s"
3437 -#: src/install.c:304 src/install.c:368
3438 +#: src/install.c:440 src/install.c:504
3440 msgid "creating directory %s"
3441 msgstr "tworzenie katalogu %s"
3443 -#: src/install.c:329
3444 +#: src/install.c:465
3446 msgid "installing multiple files, but last argument, %s is not a directory"
3448 "próba instalowania wielu plików gdy ostatni argument %s nie jest katalogiem"
3450 -#: src/install.c:432
3451 +#: src/install.c:568
3453 msgid "%s is a directory"
3454 msgstr "%s jest katalogiem"
3456 -#: src/install.c:468
3457 +#: src/install.c:610
3459 msgid "cannot change ownership of %s"
3460 msgstr "nie mo¿na zmieniæ w³a¶ciciela na %s"
3462 -#: src/install.c:492
3463 +#: src/install.c:634
3465 msgid "cannot obtain time stamps for %s"
3466 msgstr "nie mo¿na odczytaæ czasów %s"
3468 -#: src/install.c:502
3469 +#: src/install.c:644
3471 msgid "cannot set time stamps for %s"
3472 msgstr "nie mo¿na ustawiæ czasów %s"
3474 -#: src/install.c:523
3475 +#: src/install.c:665
3476 msgid "fork system call failed"
3477 msgstr "nie powiiod³o siê wywo³anie systemowe fork"
3479 -#: src/install.c:527
3480 +#: src/install.c:669
3481 msgid "cannot run strip"
3482 msgstr "nie uda³o siê uruchomiæ strip"
3484 -#: src/install.c:534
3485 +#: src/install.c:676
3486 msgid "strip failed"
3489 -#: src/install.c:555
3490 +#: src/install.c:697
3492 msgid "invalid user %s"
3493 msgstr "b³êdny u¿ytkownik %s"
3495 -#: src/install.c:573
3496 +#: src/install.c:715
3498 msgid "invalid group %s"
3499 msgstr "b³êdna grupa %s"
3501 -#: src/install.c:592
3502 +#: src/install.c:734
3505 "Usage: %s [OPTION]... SOURCE DEST (1st format)\n"
3506 @@ -3347,7 +3522,7 @@
3507 " albo: %s [OPCJA]... ¬RÓD£O... KATALOG (format 2-gi)\n"
3508 " albo: %s -d [OPCJA]... KATALOG... (format 3-ci)\n"
3510 -#: src/install.c:598
3511 +#: src/install.c:740
3513 "In the first two formats, copy SOURCE to DEST or multiple SOURCE(s) to\n"
3514 "the existing DIRECTORY, while setting permission modes and owner/group.\n"
3515 @@ -3360,12 +3535,13 @@
3516 "trzecim formacie tworzone s± wszystkie katalogi sk³adowe ¶cie¿ki KATALOG.\n"
3519 -#: src/install.c:607
3520 +#: src/install.c:749
3522 " --backup[=CONTROL] make a backup of each existing destination file\n"
3523 " -b like --backup but does not accept an argument\n"
3525 -" -C install file, unless the target already exists and is the\n"
3526 +" -C install file, unless the target already exists and is "
3528 " same, in which case mtime will remain unchanged\n"
3529 " (for compatibility with *BSD)\n"
3530 " -d, --directory treat all arguments as directory names; create all\n"
3531 @@ -3374,14 +3550,16 @@
3532 " --backup[=TRYB] robienie kopii zapasowej przed zamazaniem pliku\n"
3533 " -b jak --backup, ale bez podawania argumentu\n"
3534 " -c (ignorowane)\n"
3535 -" -C instalowanie pliku, chyba ¿e plik docelowy ju¿ istnieje\n"
3536 -" i jest taki sam - wtedy mtime pozostanie nie zmieniony\n"
3537 +" -C instalowanie pliku, chyba ¿e plik docelowy ju¿ "
3539 +" i jest taki sam - wtedy mtime pozostanie nie "
3541 " (dla kompatybilno¶ci z *BSD)\n"
3542 " -d, --directory traktowanie wszystkich argumentów jako nazw "
3544 " tworzenie katalogów sk³adowych podanych katalogów\n"
3546 -#: src/install.c:614
3547 +#: src/install.c:759
3549 " -D create all leading components of DEST except the "
3551 @@ -3401,7 +3579,7 @@
3553 " -o, --owner=W£A¦CICIEL ustawienie W£A¦CICIELA (tylko super-user)\n"
3555 -#: src/install.c:621
3556 +#: src/install.c:766
3558 " -p, --preserve-timestamps apply access/modification times of SOURCE "
3560 @@ -3416,7 +3594,15 @@
3561 " -S, --suffix=ROZSZERZ zmiana domy¶lnego ROZSZERZENIA kopii zapasowej\n"
3562 " -v, --verbose wypisanie nazwy ka¿dego tworzonego katalogu\n"
3564 -#: src/install.c:630 src/ln.c:385 src/mv.c:342
3565 +#: src/install.c:773
3567 +" -P, --preserve_context (SELinux) Preserve security context\n"
3568 +" -Z, --context=CONTEXT (SELinux) Set security context of files and directories\n"
3570 +" -P, --preserve_context (SELinux) zachowanie kontekstu bezpieczeñstwa\n"
3571 +" -Z, --context=KONTEKST (SELinux) ustawienie kontekstu plików i katalogów\n"
3573 +#: src/install.c:780 src/ln.c:385 src/mv.c:344
3576 "The backup suffix is `~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.\n"
3577 @@ -3802,82 +3988,87 @@
3578 msgid "no login name"
3579 msgstr "brak nazwy u¿ytkownika"
3584 +msgid "Sorry, this option can only be used on a SELinux-enabled kernel.\n"
3585 +msgstr "Niestety tej opcji mo¿na u¿yæ tylko na j±drze z obs³ug± SELinuksa.\n"
3594 msgstr "%b %e %H:%M"
3599 msgid "ignoring invalid value of environment variable QUOTING_STYLE: %s"
3600 msgstr "ignorujê b³êdny rozmiar zmiennej ¶rodowiskowej QUOTING_STYLE: %s"
3605 msgid "ignoring invalid width in environment variable COLUMNS: %s"
3606 msgstr "ignorujê b³êdn± d³ugo¶æ w zmiennej ¶rodowiskowej COLUMNS: %s"
3611 msgid "ignoring invalid tab size in environment variable TABSIZE: %s"
3612 msgstr "ignorujê b³êdny rozmiar tab-a w zmiennej ¶rodowiska TABSIZE: %s"
3617 msgid "invalid line width: %s"
3618 msgstr "b³êdna szeroko¶æ linii: %s"
3623 msgid "invalid tab size: %s"
3624 msgstr "b³êdny rozmiar TAB-a: %s"
3629 msgid "invalid time style format %s"
3630 msgstr "b³êdny format stylu czasu %s"
3635 msgid "unrecognized prefix: %s"
3636 msgstr "nierozpoznany prefiks: %s"
3640 msgid "unparsable value for LS_COLORS environment variable"
3641 msgstr "niezrozumia³a warto¶æ zmiennej ¶rodowiska LS_COLORS"
3646 msgid "cannot determine device and inode of %s"
3647 msgstr "nie mo¿na ustaliæ urz±dzenia i i-wêz³a %s"
3652 msgid "not listing already-listed directory: %s"
3653 msgstr "nie bêdzie wylistowany katalog %s ju¿ wylistowany poprzednio"
3655 -#: src/ls.c:2191 src/remove.c:938
3656 +#: src/ls.c:2266 src/remove.c:938
3658 msgid "reading directory %s"
3659 msgstr "czytanie katalogu %s"
3664 msgid "cannot compare file names %s and %s"
3665 msgstr "nie mo¿na porównaæ nazw plików %s i %s"
3669 msgid "User name too long"
3670 msgstr "Za d³uga nazwa u¿ytkownika"
3674 msgid "Group name too long"
3675 msgstr "Za d³uga nazwa grupy"
3680 "List information about the FILEs (the current directory by default).\n"
3681 "Sort entries alphabetically if none of -cftuSUX nor --sort.\n"
3682 @@ -3887,7 +4078,7 @@
3683 "alfabetyczne, je¿eli nie jest podana ¿adna z opcji -cftuSUX ani --sort.\n"
3689 " -a, --all do not hide entries starting with .\n"
3690 " -A, --almost-all do not list implied . and ..\n"
3691 @@ -3899,7 +4090,7 @@
3692 " --author wypisanie autora ka¿dego pliku\n"
3693 " -b, --escape wypisanie znaków niegraficznych ósemkowo\n"
3698 " --block-size=SIZE use SIZE-byte blocks\n"
3699 " -B, --ignore-backups do not list implied entries ending with ~\n"
3700 @@ -3916,7 +4107,7 @@
3701 " z -l: wypisanie ctime i sortowanie wg nazw\n"
3702 " w przeciwnym przypadku: sortowanie wg ctime\n"
3707 " -C list entries by columns\n"
3708 " --color[=WHEN] control whether color is used to distinguish "
3709 @@ -3937,7 +4128,7 @@
3710 " rozwi±zywania dowi±zañ symbolicznych\n"
3711 " -D, --dired dane wyj¶ciowe dla trybu dired Emacsa\n"
3716 " -f do not sort, enable -aU, disable -lst\n"
3717 " -F, --classify append indicator (one of */=@|) to entries\n"
3718 @@ -3957,7 +4148,7 @@
3720 " --full-time jak -l --time-style=full-iso\n"
3725 " -g like -l, but do not list owner\n"
3726 " -G, --no-group inhibit display of group information\n"
3727 @@ -3982,7 +4173,7 @@
3728 " rozwi±zywanie dowi±zañ symbolicznych podanych\n"
3729 " jako argumenty je¿eli wskazuj± na katalogi\n"
3734 " --indicator-style=WORD append indicator with style WORD to entry "
3736 @@ -4002,7 +4193,7 @@
3738 " -k jak --block-size=1K\n"
3743 " -l use a long listing format\n"
3744 " -L, --dereference when showing file information for a symbolic\n"
3745 @@ -4017,7 +4208,7 @@
3746 " -m pisanie do pe³nej szeroko¶ci, oddzielanie "
3752 " -n, --numeric-uid-gid like -l, but list numeric UIDs and GIDs\n"
3753 " -N, --literal print raw entry names (don't treat e.g. "
3754 @@ -4033,7 +4224,7 @@
3755 " -p, --file-type dopisanie znaku wskazuj±cego typ pliku (z /"
3761 " -q, --hide-control-chars print ? instead of non graphic characters\n"
3762 " --show-control-chars show non graphic characters as-is (default\n"
3763 @@ -4055,7 +4246,7 @@
3764 " literal, locale, shell, shell-always, c, "
3770 " -r, --reverse reverse order while sorting\n"
3771 " -R, --recursive list subdirectories recursively\n"
3772 @@ -4066,7 +4257,7 @@
3773 " -s, --size wypisanie liczby bloków zajêtych przez ka¿dy "
3779 " -S sort by file size\n"
3780 " --sort=WORD extension -X, none -U, size -S, time -t,\n"
3781 @@ -4091,7 +4282,7 @@
3782 " albo status; u¿ycie podanego czasu do\n"
3783 " sortowania gdy podano --sort=time\n"
3788 " --time-style=STYLE show times using style STYLE:\n"
3789 " full-iso, long-iso, iso, locale, +FORMAT\n"
3790 @@ -4115,7 +4306,7 @@
3791 " -t sortowanie wg czasu modyfikacji\n"
3792 " -T, --tabsize=KOLUMNA TAB co tyle KOLUMN, zamiast co 8\n"
3797 " -u with -lt: sort by, and show, access time\n"
3798 " with -l: show access time and sort by name\n"
3799 @@ -4131,7 +4322,7 @@
3801 " -v sortowanie wg wersji\n"
3806 " -w, --width=COLS assume screen width instead of current value\n"
3807 " -x list entries by lines instead of by columns\n"
3808 @@ -4144,7 +4335,35 @@
3809 " -X sortowanie alfabetyczne wg rozszerzeñ\n"
3810 " -1 listowanie po jednym pliku w linii\n"
3817 +"SELinux options:\n"
3819 +" --lcontext Display security context. Enable -l. Lines\n"
3820 +" will probably be too wide for most displays.\n"
3821 +" -Z, --context Display security context so it fits on most\n"
3822 +" displays. Displays only mode, user, group,\n"
3823 +" security context and file name.\n"
3824 +" --scontext Display only security context and file name.\n"
3829 +"Opcje dla SELinuksa:\n"
3831 +" --lcontext wy¶wietlanie kontekstu bezpieczeñstwa; w³±cza -l,\n"
3832 +" linie mog± byæ zbyt d³ugie dla wielu terminali\n"
3833 +" --context wy¶wietlanie kontekstu tak, ¿eby zmie¶ci³ siê na\n"
3834 +" wiêkszo¶ci terminali; wy¶wietlane s± tylko\n"
3835 +" uprawnienia, w³a¶ciciel, grupa, kontekst\n"
3836 +" bezpieczeñstwa i nazwa pliku\n"
3837 +" --scontext wy¶wietlanie tylko kontekstu i nazwy pliku\n"
3844 "By default, color is not used to distinguish types of files. That is\n"
3845 @@ -4318,12 +4537,12 @@
3846 msgid "only one argument may be specified when using --check"
3847 msgstr "je¿eli jest u¿ywana opcja --check mo¿na podaæ tylko jeden argument"
3852 msgid "Usage: %s [OPTION] DIRECTORY...\n"
3853 msgstr "Sk³adnia: %s [OPCJA] KATALOG...\n"
3858 "Create the DIRECTORY(ies), if they do not already exist.\n"
3860 @@ -4331,7 +4550,12 @@
3861 "Utworzenie KATALOGU/ÓW, je¿eli jeszcze nie istniej±.\n"
3867 +msgid " -Z, --context=CONTEXT (SELinux) set security context to CONTEXT\n"
3868 +msgstr " -Z, --context=KONTEKST (SELinux) ustawienie KONTEKSTU bezpieczeñstwa\n"
3872 " -m, --mode=MODE set permission mode (as in chmod), not rwxrwxrwx - "
3874 @@ -4343,22 +4567,27 @@
3876 " -v, --verbose wypisanie komunikatu o ka¿dym utworzonym katalogu\n"
3881 msgid "created directory %s"
3882 msgstr "utworzony katalog %s"
3885 +#: src/mkdir.c:170 src/mkfifo.c:128 src/mknod.c:139
3887 +msgid "Sorry, cannot set default context to %s.\n"
3888 +msgstr "Niestety nie mo¿na ustawiæ domy¶lnego kontekstu na %s.\n"
3892 msgid "cannot set permissions of directory %s"
3893 msgstr "nie mo¿na ustawiæ uprawnieñ katalogu %s"
3898 msgid "Usage: %s [OPTION] NAME...\n"
3899 msgstr "Sk³adnia: %s [OPCJA] NAZWA...\n"
3904 "Create named pipes (FIFOs) with the given NAMEs.\n"
3906 @@ -4366,31 +4595,36 @@
3907 "Tworzenie nazwanych potoków (pipes, FIFOs) o podanych NAZWACH.\n"
3910 -#: src/mkfifo.c:63 src/mknod.c:64
3911 +#: src/mkfifo.c:68 src/mknod.c:69
3913 +msgid " -Z, --context=CONTEXT set security context (quoted string)\n"
3914 +msgstr " -Z, --context=KONTEKST ustawienie kontekstu bezpieczeñstwa (³añcuch cytowany)\n"
3916 +#: src/mkfifo.c:75 src/mknod.c:76
3918 " -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask\n"
3920 " -m, --mode=UPRAWN ustawienie uprawnieñ (jak w chmod), nie a=rw-umask\n"
3922 -#: src/mkfifo.c:94 src/mknod.c:207
3923 +#: src/mkfifo.c:106 src/mknod.c:236
3924 msgid "fifo files not supported"
3925 msgstr "potoki nie s± obs³ugiwane przez ten system"
3927 -#: src/mkfifo.c:124 src/mknod.c:128
3928 +#: src/mkfifo.c:152 src/mknod.c:157
3929 msgid "invalid mode"
3930 msgstr "b³êdne uprawnienia"
3932 -#: src/mkfifo.c:143
3933 +#: src/mkfifo.c:171
3935 msgid "cannot set permissions of fifo %s"
3936 msgstr "nie mo¿na ustawiæ uprawnieñ potoku %s"
3941 msgid "Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n"
3942 msgstr "Sk³adnia: %s [OPCJA]... NAZWA TYP [WIÊKSZY MNIEJSZY]\n"
3947 "Create the special file NAME of the given TYPE.\n"
3949 @@ -4398,7 +4632,7 @@
3950 "Utworzenie pliku specjalnego o podanej NAZWIE i TYPIE.\n"
3957 "Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they\n"
3958 @@ -4413,7 +4647,7 @@
3959 "szesnastkowa. Je¿eli zaczyna siê od 0 - jako ósemkowa. W innych wypadkach -\n"
3960 "jako dziêsi±tkowa. TYP mo¿e byæ:\n"
3966 " b create a block (buffered) special file\n"
3967 @@ -4425,19 +4659,19 @@
3968 " c, u specjalny plik znakowy (niebuforowany)\n"
3973 msgid "wrong number of arguments"
3974 msgstr "z³a liczba argumentów"
3978 msgid "block special files not supported"
3979 msgstr "specjalne pliki blokowe nie s± obs³ugiwane"
3983 msgid "character special files not supported"
3984 msgstr "specjalne pliki znakowe nie s± obs³ugiwane"
3989 "when creating special files, major and minor device\n"
3990 "numbers must be specified"
3991 @@ -4445,36 +4679,36 @@
3992 "dla utworzenia specjalnego pliku blokowego wiêkszy i mniejszy\n"
3993 "numer urz±dzenia musz± byæ podane"
3998 msgid "invalid major device number %s"
3999 msgstr "b³êdny wiêkszy numer urz±dzenia %s"
4004 msgid "invalid minor device number %s"
4005 msgstr "b³êdny mniejszy numer urz±dzenia %s"
4010 msgid "invalid device %s %s"
4011 msgstr "b³êdne urz±dzenie %s %s"
4015 msgid "major and minor device numbers may not be specified for fifo files"
4016 msgstr "wiêkszy i mniejszy numer urz±dzenia nie mo¿e byæ podany dla fifo"
4021 msgid "invalid device type %s"
4022 msgstr "b³êdne typ urz±dzenia %s"
4027 msgid "cannot set permissions of %s"
4028 msgstr "nie mo¿na ustawiæ uprawnieñ do %s"
4033 "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"
4035 @@ -4483,7 +4717,7 @@
4042 " --backup[=CONTROL] make a backup of each existing destination "
4044 @@ -4503,7 +4737,7 @@
4045 " -i, --interactive pytanie przed zamazaniem\n"
4046 " (równowa¿ne --reply=query)\n"
4051 " --reply={yes,no,query} specify how to handle the prompt about an\n"
4052 " existing destination file\n"
4053 @@ -4518,7 +4752,7 @@
4054 " -S, --suffix=ROZSZERZ zmiana domy¶lnego rozszerzenia kopii "
4060 " --target-directory=DIRECTORY move all SOURCE arguments into "
4062 @@ -4533,12 +4767,12 @@
4063 " CELU albo nie ma CELU\n"
4064 " -v, --verbose wyja¶nianie co siê dzieje\n"
4069 msgid "specified target, %s is not a directory"
4070 msgstr "podany cel %s nie jest katalogiem"
4074 msgid "when moving multiple files, last argument must be a directory"
4076 "gdy przenoszonych jest wiele plików, ostatni argument musi byæ katalogiem"
4077 @@ -6037,6 +6271,72 @@
4078 " -v, --verbose informacja diagnostyczna o ka¿dym przetworzonym\n"
4084 +"Usage: %s [OPTION]... command [args]\n"
4085 +"Run a program in a different security context.\n"
4087 +" context Complete security context\n"
4088 +" -t type (for same role as parent)\n"
4089 +" -u user identity\n"
4092 +" --help display this help and exit\n"
4094 +"Sk³adnia: %s [OPCJA]... polecenie [argumenty]\n"
4095 +"Uruchomienie programu w innym kontek¶cie bezpieczeñstwa.\n"
4097 +" kontekst pe³ny kontekst bezpieczeñstwa\n"
4098 +" -t typ (dla tej samej roli jako rodzica)\n"
4099 +" -u identyfikator u¿ytkownika\n"
4101 +" -l zakres poziomów\n"
4102 +" --help wy¶wietlenie tego opisu i zakoñczenie\n"
4106 +msgid "multiple roles\n"
4107 +msgstr "wiele ról\n"
4111 +msgid "multiple types\n"
4112 +msgstr "wiele typów\n"
4114 +#: src/runcon.c:104
4116 +msgid "multiple users\n"
4117 +msgstr "wielu u¿ytkowników\n"
4119 +#: src/runcon.c:111
4121 +msgid "multiple levelranges\n"
4122 +msgstr "wiele zakresów poziomów\n"
4124 +#: src/runcon.c:117
4126 +msgid "unrecognised option %c\n"
4127 +msgstr "nierozpoznana opcja %c\n"
4129 +#: src/runcon.c:125
4130 +msgid "must specify -t, -u, -l, -r, or context"
4131 +msgstr "trzeba podaæ -t, -u, -l, -r albo kontekst"
4133 +#: src/runcon.c:131
4134 +msgid "no command found"
4135 +msgstr "nie znaleziono polecenia"
4137 +#: src/runcon.c:137 src/runcon.c:145
4139 +msgid "%s is not a valid context\n"
4140 +msgstr "%s nie jest poprawnym kontekstem\n"
4142 +#: src/runcon.c:163
4144 +msgid "unable to setup security context %s\n"
4145 +msgstr "nie mo¿na ustawiæ kontekstu bezpieczeñstwa %s\n"
4150 @@ -6706,23 +7006,24 @@
4151 msgid "invalid number of lines: 0"
4152 msgstr "b³êdna liczba linii: 0"
4157 msgid "cannot read file system information for %s"
4158 msgstr "nie mo¿na przeczytaæ informacji systemowych o %s"
4163 msgid "Usage: %s [OPTION] FILE...\n"
4164 msgstr "Sk³adnia: %s [OPCJA] PLIK...\n"
4169 "Display file or filesystem status.\n"
4171 " -f, --filesystem display filesystem status instead of file status\n"
4172 " -c --format=FORMAT use the specified FORMAT instead of the default\n"
4173 " -L, --dereference follow links\n"
4174 +" -Z, --context print the security context\n"
4175 " -t, --terse print the information in terse form\n"
4177 "Pokazanie danych pliku albo systemu plików\n"
4178 @@ -6730,9 +7031,10 @@
4179 " -f, --filesystem pokazanie danych systemu plików, a nie pliku\n"
4180 " -c --format=FORMAT u¿ycie podanego FORMATU zamiast domy¶lnego\n"
4181 " -L, --dereference rozwi±zywanie dowi±zañ symbolicznych\n"
4182 +" -Z, --context wypisywanie kontekstu bezpieczeñstwa\n"
4183 " -t, --terse wypisywanie informacji w skróconej formie\n"
4189 "The valid format sequences for files (without --filesystem):\n"
4190 @@ -6750,7 +7052,7 @@
4191 " %B rozmiar w bajtach ka¿dego bloku podanego przez `%b'\n"
4192 " %b liczba zajêtych bloków (zobacz %B)\n"
4197 " %D Device number in hex\n"
4198 " %d Device number in decimal\n"
4199 @@ -6766,7 +7068,7 @@
4200 " %G nazwa grupy w³a¶ciciela pliku\n"
4201 " %g numer grupy w³a¶ciciela pliku\n"
4206 " %h Number of hard links\n"
4207 " %i Inode number\n"
4208 @@ -6786,7 +7088,7 @@
4209 " %T mniejszy numer urz±dzenia szesnastkowo\n"
4210 " %t wiêkszy numer urz±dzenia szesnastkowo\n"
4215 " %U User name of owner\n"
4216 " %u User ID of owner\n"
4217 @@ -6808,7 +7110,7 @@
4218 " %z czas ostatniej zmiany czasu\n"
4224 "Valid format sequences for file systems:\n"
4226 @@ -6817,6 +7119,7 @@
4227 " %c Total file nodes in file system\n"
4228 " %d Free file nodes in file system\n"
4229 " %f Free blocks in file system\n"
4230 +" %C Security context in SELinux\n"
4232 "Prawid³owe specyfikacje formatu dla systemów plików:\n"
4234 @@ -6825,8 +7128,9 @@
4235 " %c ca³kowita liczba i-wêz³ów w systemie plików\n"
4236 " %d liczba wolnych i-wêz³ów w systemie plików\n"
4237 " %f liczba wolnych bloków w systemie plików\n"
4238 +" %C kontekst bezpieczeñstwa w SELinuksie\n"
4243 " %i File System id in hex\n"
4244 " %l Maximum length of filenames\n"
4245 @@ -6842,10 +7146,14 @@
4246 " %T typ w formie czytelnej dla cz³owieka\n"
4247 " %t typ szesnastkowo\n"
4251 msgid "Warning: `-l' is deprecated; use `-L' instead"
4252 msgstr "Uwaga: opcja -l zostanie w przysz³o¶ci usuniêta, u¿ywaj -L"
4255 +msgid "Kernel is not SELinux enabled"
4256 +msgstr "J±dro nie ma obs³ugi SELinuksa"