]> git.pld-linux.org Git - packages/coreutils.git/blob - coreutils-selinux.patch
- Fixes suggested by glen - TX
[packages/coreutils.git] / coreutils-selinux.patch
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
3 @@ -14,6 +14,13 @@
4  LIB_PAM="-ldl -lpam -lpam_misc"
5  AC_SUBST(LIB_PAM)])
6  
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)])
13 +
14  gl_DEFAULT_POSIX2_VERSION
15  gl_USE_SYSTEM_EXTENSIONS
16  jm_PERL
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
19 @@ -195,6 +195,20 @@
20  .TP
21  \fB\-1\fR
22  list one file per line
23 +.PP
24 +SELinux options:
25 +.TP
26 +\fB\-\-lcontext\fR
27 +Display security context.   Enable \fB\-l\fR. Lines
28 +will probably be too wide for most displays.
29 +.TP
30 +\fB\-\-context\fR
31 +Display security context so it fits on most
32 +displays.  Displays only mode, user, group,
33 +security context and file name.
34 +.TP
35 +\fB\-\-scontext\fR
36 +Display only security context and file name.
37  .TP
38  \fB\-\-help\fR
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
42 @@ -57,7 +57,7 @@
43  .TP
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
49  .TP
50  \fB\-\-no\-preserve\fR=\fIATTR_LIST\fR
51 @@ -109,6 +109,9 @@
52  \fB\-\-help\fR
53  display this help and exit
54  .TP
55 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
56 +set security context of copy to CONTEXT
57 +.TP
58  \fB\-\-version\fR
59  output version information and exit
60  .PP
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
63 @@ -12,6 +12,8 @@
64  .PP
65  Mandatory arguments to long options are mandatory for short options too.
66  .TP
67 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR (SELinux) set security context to CONTEXT
68 +.TP
69  \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
70  set permission mode (as in chmod), not rwxrwxrwx - umask
71  .TP
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
74 @@ -195,6 +195,20 @@
75  .TP
76  \fB\-1\fR
77  list one file per line
78 +.PP
79 +SELinux options:
80 +.TP
81 +\fB\-\-lcontext\fR
82 +Display security context.   Enable \fB\-l\fR. Lines
83 +will probably be too wide for most displays.
84 +.TP
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.
89 +.TP
90 +\fB\-\-scontext\fR
91 +Display only security context and file name.
92  .TP
93  \fB\-\-help\fR
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
97 @@ -12,6 +12,9 @@
98  .PP
99  Mandatory arguments to long options are mandatory for short options too.
100  .TP
101 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
102 +set security context (quoted string)
103 +.TP
104  \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
105  set permission mode (as in chmod), not a=rw - umask
106  .TP
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
109 @@ -10,7 +10,7 @@
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
115  man_MANS = getgid.1
116  
117  man_aux = $(dist_man_MANS:.1=.x)
118 @@ -112,6 +112,8 @@
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
124  
125  SUFFIXES = .x .1
126  
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
129 @@ -12,6 +12,9 @@
130  .PP
131  Mandatory arguments to long options are mandatory for short options too.
132  .TP
133 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
134 +set security context (quoted string)
135 +.TP
136  \fB\-m\fR, \fB\-\-mode\fR=\fIMODE\fR
137  set permission mode (as in chmod), not a=rw - umask
138  .TP
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
141 @@ -0,0 +1,39 @@
142 +.TH RUNCON "1" "July 2003" "runcon (coreutils) 5.0" "selinux"
143 +.SH NAME
144 +runcon \- run command with specified security context 
145 +.SH SYNOPSIS
146 +.B runcon
147 +[\fI-t TYPE\fR] [\fI-l LEVEL\fR] [\fI-u USER\fR] [\fI-r ROLE\fR] \fICOMMAND\fR [\fIARGS...\fR]
148 +.PP
149 +or
150 +.PP
151 +.B runcon
152 +\fICONTEXT\fR \fICOMMAND\fR [\fIargs...\fR]
153 +.PP
154 +.br
155 +.SH DESCRIPTION
156 +.PP
157 +.\" Add any additional description here
158 +.PP
159 +Run COMMAND with current security context modified by one or more of LEVEL,
160 +ROLE, TYPE, and USER, or with completely-specified CONTEXT.
161 +.TP
162 +\fB\-t\fR
163 +change current type to the specified type
164 +.TP
165 +\fB\-l\fR
166 +change current level range to the specified range
167 +.TP
168 +\fB\-r\fR
169 +change current role to the specified role
170 +.TP
171 +\fB\-u\fR
172 +change current user to the specified user
173 +.PP
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
177 +command.
178 +.PP
179 +Note that only carefully-chosen contexts are likely to successfully
180 +run.
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
183 @@ -0,0 +1,64 @@
184 +.TH CHCON 1 "July 2003" "chcon (coreutils) 5.0" "User Commands"
185 +.SH NAME
186 +chcon \- change security context
187 +.SH SYNOPSIS
188 +.B chcon
189 +[\fIOPTION\fR]...\fI CONTEXT FILE\fR...
190 +.br
191 +.B chcon
192 +[\fIOPTION\fR]...\fI --reference=RFILE FILE\fR...
193 +.SH DESCRIPTION
194 +.PP
195 +." Add any additional description here
196 +.PP
197 +Change the security context of each FILE to CONTEXT.
198 +.TP
199 +\fB\-c\fR, \fB\-\-changes\fR
200 +like verbose but report only when a change is made
201 +.TP
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)
204 +.TP
205 +\fB\-f\fR, \fB\-\-silent\fR, \fB\-\-quiet\fR
206 +suppress most error messages
207 +.TP
208 +\fB\-l\fR, \fB\-\-range\fR
209 +set range RANGE in the target security context
210 +.TP
211 +\fB\-\-reference\fR=\fIRFILE\fR
212 +use RFILE's context instead of using a CONTEXT value
213 +.TP
214 +\fB\-R\fR, \fB\-\-recursive\fR
215 +change files and directories recursively
216 +.TP
217 +\fB\-r\fR, \fB\-\-role\fR
218 +set role ROLE in the target security context
219 +.TP
220 +\fB\-t\fR, \fB\-\-type\fR
221 +set type TYPE in the target security context
222 +.TP
223 +\fB\-u\fR, \fB\-\-user\fR
224 +set user USER in the target security context
225 +.TP
226 +\fB\-v\fR, \fB\-\-verbose\fR
227 +output a diagnostic for every file processed
228 +.TP
229 +\fB\-\-help\fR
230 +display this help and exit
231 +.TP
232 +\fB\-\-version\fR
233 +output version information and exit
234 +.SH "REPORTING BUGS"
235 +Report bugs to <email@host.com>.
236 +.SH "SEE ALSO"
237 +The full documentation for
238 +.B chcon
239 +is maintained as a Texinfo manual.  If the
240 +.B info
241 +and
242 +.B chcon
243 +programs are properly installed at your site, the command
244 +.IP
245 +.B info chcon
246 +.PP
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
250 @@ -13,6 +13,9 @@
251  \fB\-a\fR
252  ignore, for compatibility with other versions
253  .TP
254 +\fB\-Z\fR, \fB\-\-context\fR
255 +print only the security context
256 +.TP
257  \fB\-g\fR, \fB\-\-group\fR
258  print only the effective group ID
259  .TP
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
262 @@ -22,6 +22,9 @@
263  \fB\-t\fR, \fB\-\-terse\fR
264  print the information in terse form
265  .TP
266 +\fB\-Z\fR, \fB\-\-context\fR
267 +print security context information for SELinux if available.
268 +.TP
269  \fB\-\-help\fR
270  display this help and exit
271  .TP
272 @@ -42,6 +45,9 @@
273  %b
274  Number of blocks allocated (see %B)
275  .TP
276 +%C
277 +SELinux security context
278 +.TP
279  %D
280  Device number in hex
281  .TP
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
284 @@ -0,0 +1,4 @@
285 +[NAME]
286 +chcon \- change file security context
287 +[DESCRIPTION]
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
291 @@ -195,6 +195,20 @@
292  .TP
293  \fB\-1\fR
294  list one file per line
295 +.PP
296 +SELinux options:
297 +.TP
298 +\fB\-\-lcontext\fR
299 +Display security context.   Enable \fB\-l\fR. Lines
300 +will probably be too wide for most displays.
301 +.TP
302 +\fB\-\-context\fR
303 +Display security context so it fits on most
304 +displays.  Displays only mode, user, group,
305 +security context and file name.
306 +.TP
307 +\fB\-\-scontext\fR
308 +Display only security context and file name.
309  .TP
310  \fB\-\-help\fR
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
314 @@ -0,0 +1,2 @@
315 +[DESCRIPTION]
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
319 @@ -60,6 +60,11 @@
320  .TP
321  \fB\-v\fR, \fB\-\-verbose\fR
322  print the name of each directory as it is created
323 +.HP
324 +\fB\-P\fR, \fB\-\-preserve_context\fR (SELinux) Preserve security context
325 +.TP
326 +\fB\-Z\fR, \fB\-\-context\fR=\fICONTEXT\fR
327 +(SELinux) Set security context of files and directories
328  .TP
329  \fB\-\-help\fR
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
336  
337 +/* Define if you want to use SELINUX */
338 +#undef WITH_SELINUX
339 +
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
345 @@ -7,11 +7,11 @@
346  
347  The programs that can be built with this package are:
348  
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
358  
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
361 @@ -42,6 +42,8 @@
362  
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;
367  
368      # false fails even when invoked with --help or --version.
369      if test $i = false; then
370 @@ -154,7 +156,7 @@
371  
372  for i in $all_programs; do
373    # Skip these.
374 -  case $i in chroot|stty|tty|false) continue;; esac
375 +  case $i in chroot|stty|tty|false|chcon|runcon) continue;; esac
376  
377    rm -rf $tmp_in $tmp_in2 $tmp_dir $tmp_out
378    echo > $tmp_in
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
381 @@ -34,6 +34,10 @@
382  
383  #define AUTHORS "David MacKenzie"
384  
385 +#ifdef WITH_SELINUX
386 +#include <selinux/selinux.h>          /* for is_selinux_enabled() */
387 +#endif
388 +
389  /* The name this program was run with. */
390  char *program_name;
391  
392 @@ -42,6 +46,9 @@
393  
394  static struct option const longopts[] =
395  {
396 +#ifdef WITH_SELINUX
397 +  {"context", required_argument, NULL, 'Z'},
398 +#endif
399    {"mode", required_argument, NULL, 'm'},
400    {"parents", no_argument, NULL, 'p'},
401    {"verbose", no_argument, NULL, 'v'},
402 @@ -63,6 +70,11 @@
403  Create the DIRECTORY(ies), if they do not already exist.\n\
404  \n\
405  "), stdout);
406 +#ifdef WITH_SELINUX
407 +      printf (_("\
408 +  -Z, --context=CONTEXT (SELinux) set security context to CONTEXT\n\
409 +"));
410 +#endif
411        fputs (_("\
412  Mandatory arguments to long options are mandatory for short options too.\n\
413  "), stdout);
414 @@ -98,7 +110,11 @@
415  
416    create_parents = 0;
417  
418 +#ifdef WITH_SELINUX
419 +  while ((optc = getopt_long (argc, argv, "pm:vZ:", longopts, NULL)) != -1)
420 +#else
421    while ((optc = getopt_long (argc, argv, "pm:v", longopts, NULL)) != -1)
422 +#endif
423      {
424        switch (optc)
425         {
426 @@ -113,6 +129,19 @@
427         case 'v': /* --verbose  */
428           verbose_fmt_string = _("created directory %s");
429           break;
430 +#ifdef WITH_SELINUX
431 +       case 'Z':
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") );
435 +           exit( 1 );
436 +         }
437 +         if (setfscreatecon(optarg)) {
438 +           fprintf( stderr, _("Sorry, cannot set default context to %s.\n"), optarg);
439 +           exit( 1 );
440 +         }
441 +         break;
442 +#endif
443         case_GETOPT_HELP_CHAR;
444         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
445         default:
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
448 @@ -49,6 +49,11 @@
449  
450  #define AUTHORS "Torbjorn Granlund", "David MacKenzie", "Jim Meyering"
451  
452 +#ifdef WITH_SELINUX
453 +#include <selinux/selinux.h>          /* for is_selinux_enabled() */
454 +int selinux_enabled=0;
455 +#endif
456 +
457  #ifndef _POSIX_VERSION
458  uid_t geteuid ();
459  #endif
460 @@ -143,6 +148,9 @@
461    {"update", no_argument, NULL, 'u'},
462    {"verbose", no_argument, NULL, 'v'},
463    {"version-control", required_argument, NULL, 'V'}, /* Deprecated. FIXME. */
464 +#ifdef WITH_SELINUX
465 +  {"context", required_argument, NULL, 'Z'},
466 +#endif
467    {GETOPT_HELP_OPTION_DECL},
468    {GETOPT_VERSION_OPTION_DECL},
469    {NULL, 0, NULL, 0}
470 @@ -192,6 +200,9 @@
471                                   additional attributes: links, all\n\
472  "), stdout);
473        fputs (_("\
474 +  -c                           same as --preserve=context\n\
475 +"), stdout);
476 +      fputs (_("\
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\
480 @@ -219,6 +230,7 @@
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\
485  "), stdout);
486        fputs (HELP_OPTION_DESCRIPTION, stdout);
487        fputs (VERSION_OPTION_DESCRIPTION, stdout);
488 @@ -748,8 +760,8 @@
489         {
490           new_dest = (char *) dest;
491         }
492 -
493 -      return copy (source, new_dest, new_dst, x, &unused, NULL);
494 +      ret=copy (source, new_dest, new_dst, x, &unused, NULL);
495 +      return ret;
496      }
497  
498    /* unreachable */
499 @@ -773,6 +785,10 @@
500    x->preserve_mode = 0;
501    x->preserve_timestamps = 0;
502  
503 +#ifdef WITH_SELINUX
504 +  x->preserve_security_context = 0;
505 +#endif
506 +
507    x->require_preserve = 0;
508    x->recursive = 0;
509    x->sparse_mode = SPARSE_AUTO;
510 @@ -800,19 +816,20 @@
511        PRESERVE_TIMESTAMPS,
512        PRESERVE_OWNERSHIP,
513        PRESERVE_LINK,
514 +      PRESERVE_CONTEXT,
515        PRESERVE_ALL
516      };
517    static enum File_attribute const preserve_vals[] =
518      {
519        PRESERVE_MODE, PRESERVE_TIMESTAMPS,
520 -      PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_ALL
521 +      PRESERVE_OWNERSHIP, PRESERVE_LINK, PRESERVE_CONTEXT, PRESERVE_ALL
522      };
523  
524    /* Valid arguments to the `--preserve' option. */
525    static char const* const preserve_args[] =
526      {
527        "mode", "timestamps",
528 -      "ownership", "links", "all", 0
529 +      "ownership", "links", "context", "all", 0
530      };
531  
532    char *arg_writable = xstrdup (arg);
533 @@ -847,11 +864,16 @@
534           x->preserve_links = on_off;
535           break;
536  
537 +       case PRESERVE_CONTEXT:
538 +         x->preserve_security_context = on_off;
539 +         break;
540 +
541         case PRESERVE_ALL:
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;
547           break;
548  
549         default:
550 @@ -875,6 +897,10 @@
551    struct cp_options x;
552    int copy_contents = 0;
553    char *target_directory = NULL;
554 +#ifdef WITH_SELINUX
555 +  security_context_t scontext = NULL;
556 +  selinux_enabled= (is_selinux_enabled()>0);
557 +#endif
558  
559    initialize_main (&argc, &argv);
560    program_name = argv[0];
561 @@ -890,7 +916,11 @@
562       we'll actually use backup_suffix_string.  */
563    backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX");
564  
565 +#ifdef WITH_SELINUX
566 +  while ((c = getopt_long (argc, argv, "abcdfHilLprsuvxPRS:V:Z:", long_opts, NULL))
567 +#else
568    while ((c = getopt_long (argc, argv, "abdfHilLprsuvxPRS:V:", long_opts, NULL))
569 +#endif
570          != -1)
571      {
572        switch (c)
573 @@ -981,6 +1011,35 @@
574           x.preserve_timestamps = 1;
575           x.require_preserve = 1;
576           break;
577 +#ifdef WITH_SELINUX
578 +       case 'c':
579 +         if ( scontext != NULL ) { 
580 +             (void) fprintf(stderr, _("%s: cannot force target context <-- %s and preserve it\n"), argv[0], scontext);
581 +           exit( 1 );
582 +         }
583 +         else if (selinux_enabled) 
584 +           x.preserve_security_context = 1;
585 +         break;
586 +
587 +       case 'Z':
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") );
591 +           break;
592 +         }
593 +         if ( x.preserve_security_context ) {
594 +           (void) fprintf(stderr, _("%s: cannot force target context to '%s' and preserve it\n"), argv[0], optarg);
595 +           exit( 1 );
596 +         }
597 +         scontext = 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);
602 +           exit( 1 );
603 +         }
604 +         break;
605 +#endif
606  
607         case PARENTS_OPTION:
608           flag_path = 1;
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
611 @@ -42,6 +42,13 @@
612  # endif
613  #endif
614  
615 +#ifdef WITH_SELINUX
616 +#include <selinux/selinux.h>
617 +#define SECURITY_ID_T security_context_t
618 +#else
619 +#define SECURITY_ID_T char *
620 +#endif
621 +
622  #include "system.h"
623  
624  #include "error.h"
625 @@ -95,6 +102,7 @@
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},
633 @@ -345,7 +353,7 @@
634  /* print statfs info */
635  static void
636  print_statfs (char *pformat, char m, char const *filename,
637 -             void const *data)
638 +             void const *data,SECURITY_ID_T scontext)
639  {
640    STRUCT_STATVFS const *statfsbuf = data;
641  
642 @@ -407,7 +415,10 @@
643        strcat (pformat, PRIdMAX);
644        printf (pformat, (intmax_t) (statfsbuf->f_ffree));
645        break;
646 -
647 +    case 'C':
648 +      strcat (pformat, "s");
649 +      printf(scontext);
650 +      break;
651      default:
652        strcat (pformat, "c");
653        printf (pformat, m);
654 @@ -417,7 +428,7 @@
655  
656  /* print stat info */
657  static void
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)
660  {
661    struct stat *statbuf = (struct stat *) data;
662    struct passwd *pw_ent;
663 @@ -553,6 +564,10 @@
664        strcat (pformat, "d");
665        printf (pformat, (int) statbuf->st_ctime);
666        break;
667 +    case 'C':
668 +      strcat (pformat, "s");
669 +      printf(pformat,scontext);
670 +      break;
671      default:
672        strcat (pformat, "c");
673        printf (pformat, m);
674 @@ -562,8 +577,8 @@
675  
676  static void
677  print_it (char const *masterformat, char const *filename,
678 -         void (*print_func) (char *, char, char const *, void const *),
679 -         void const *data)
680 +         void (*print_func) (char *, char, char const *, void const *,SECURITY_ID_T ),
681 +         void const *data,  SECURITY_ID_T scontext)
682  {
683    char *b;
684  
685 @@ -598,7 +613,7 @@
686               putchar ('%');
687               break;
688             default:
689 -             print_func (dest, *p, filename, data);
690 +             print_func (dest, *p, filename, data,scontext);
691               break;
692             }
693         }
694 @@ -615,9 +630,17 @@
695  
696  /* stat the filesystem and print what we find */
697  static void
698 -do_statfs (char const *filename, int terse, char const *format)
699 +do_statfs (char const *filename, int terse, int secure, char const *format)
700  {
701    STRUCT_STATVFS statfsbuf;
702 +  SECURITY_ID_T scontext = NULL;
703 +#ifdef WITH_SELINUX
704 +  if(secure)
705 +    if (getfilecon(filename,&scontext)<0) {
706 +      perror (filename);
707 +      return;
708 +    }
709 +#endif
710    int i = statfs (filename, &statfsbuf);
711  
712    if (i == -1)
713 @@ -629,23 +652,40 @@
714  
715    if (format == NULL)
716      {
717 -      format = (terse
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");
723 -    }
724 -
725 -  print_it (format, filename, print_statfs, &statfsbuf);
726 +      if (terse) {
727 +       if(secure)
728 +         format = "%n %i %l %t %b %f %a %s %c %d %C";
729 +       else
730 +         format = "%n %i %l %t %b %f %a %s %c %d";
731 +      } 
732 +      else 
733 +       {
734 +         if(secure)
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";
740 +         else  
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";
745 +       }       
746 +    }
747 +  print_it (format, filename, print_statfs, &statfsbuf,scontext);
748 +#ifdef WITH_SELINUX
749 +  if (scontext != NULL)
750 +    freecon(scontext);
751 +#endif
752  }
753 -
754  /* stat the file and print what we find */
755  static void
756 -do_stat (char const *filename, int follow_links, int terse,
757 +  do_stat (char const *filename, int follow_links, int terse,int secure,
758          char const *format)
759  {
760    struct stat statbuf;
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 @@
766        return;
767      }
768  
769 +#ifdef WITH_SELINUX
770 +  if(secure) {
771 +    if (link) 
772 +      i=lgetfilecon(filename, &scontext);
773 +    else
774 +      i=getfilecon(filename, &scontext);
775 +    if (i == -1)
776 +      {
777 +       perror (filename);
778 +       return;
779 +      }
780 +  }
781 +#endif
782 +
783    if (format == NULL)
784      {
785        if (terse != 0)
786         {
787 -         format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o";
788 +          if (secure)
789 +                 format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o %C";
790 +          else
791 +            format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o";
792         }
793        else
794         {
795 @@ -668,7 +725,17 @@
796           i = statbuf.st_mode & S_IFMT;
797           if (i == S_IFCHR || i == S_IFBLK)
798             {
799 -             format =
800 +               if (secure)
801 +                               format =
802 +                         "  File: %N\n"
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"
807 +                         "   S_Context: %C\n"
808 +                         "Access: %x\n" "Modify: %y\n" "Change: %z\n";
809 +               else
810 +              format =
811                 "  File: %N\n"
812                 "  Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
813                 "Device: %Dh/%dd\tInode: %-10i  Links: %-5h"
814 @@ -678,6 +745,15 @@
815             }
816           else
817             {
818 +               if (secure)
819 +                 format =
820 +                   "  File: %N\n"
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"
824 +                   "S_Context: %C\n"
825 +                   "Access: %x\n" "Modify: %y\n" "Change: %z\n";
826 +                else
827               format =
828                 "  File: %N\n"
829                 "  Size: %-10s\tBlocks: %-10b IO Block: %-6o %F\n"
830 @@ -687,7 +763,11 @@
831             }
832         }
833      }
834 -  print_it (format, filename, print_stat, &statbuf);
835 +  print_it (format, filename, print_stat, &statbuf,scontext);
836 +#ifdef WITH_SELINUX
837 +  if (scontext) 
838 +    freecon(scontext);
839 +#endif
840  }
841  
842  void
843 @@ -705,6 +785,7 @@
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\
849  "), stdout);
850        fputs (HELP_OPTION_DESCRIPTION, stdout);
851 @@ -756,6 +837,7 @@
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\
856  "), stdout);
857        fputs (_("\
858    %i   File System id in hex\n\
859 @@ -778,6 +860,7 @@
860    int follow_links = 0;
861    int fs = 0;
862    int terse = 0;
863 +  int secure = 0;
864    char *format = NULL;
865  
866    initialize_main (&argc, &argv);
867 @@ -788,7 +871,7 @@
868  
869    atexit (close_stdout);
870  
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)
873      {
874        switch (c)
875         {
876 @@ -810,6 +893,14 @@
877         case 't':
878           terse = 1;
879           break;
880 +       case 'Z':
881 +         if((is_selinux_enabled()>0))
882 +           secure = 1;
883 +         else {
884 +           error (0, 0, _("Kernel is not SELinux enabled"));
885 +           usage (EXIT_FAILURE);
886 +         }
887 +         break;
888  
889         case_GETOPT_HELP_CHAR;
890  
891 @@ -829,9 +920,9 @@
892    for (i = optind; i < argc; i++)
893      {
894        if (fs == 0)
895 -       do_stat (argv[i], follow_links, terse, format);
896 +       do_stat (argv[i], follow_links, terse, secure, format);
897        else
898 -       do_statfs (argv[i], terse, format);
899 +       do_statfs (argv[i], terse, secure, format);
900      }
901  
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
905 @@ -121,6 +121,17 @@
906  
907  #define AUTHORS "Richard Stallman", "David MacKenzie"
908  
909 +#ifdef WITH_SELINUX
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 ); \
916 +}
917 +
918 +#endif
919 +
920  #define obstack_chunk_alloc malloc
921  #define obstack_chunk_free free
922  
923 @@ -192,6 +203,10 @@
924      /* For long listings, true if the file has an access control list.  */
925      bool have_acl;
926  #endif
927 +
928 +#ifdef WITH_SELINUX
929 +    security_context_t scontext;
930 +#endif
931    };
932  
933  #if HAVE_ACL || USE_ACL
934 @@ -256,6 +271,9 @@
935  static void sort_files (void);
936  static void parse_ls_color (void);
937  void usage (int status);
938 +#ifdef WITH_SELINUX
939 +static void print_scontext_format (const struct fileinfo *f);
940 +#endif
941  
942  /* The name the program was run with, stripped of any leading path. */
943  char *program_name;
944 @@ -354,7 +372,10 @@
945      one_per_line,              /* -1 */
946      many_per_line,             /* -C */
947      horizontal,                        /* -x */
948 -    with_commas                        /* -m */
949 +#ifdef WITH_SELINUX
950 +    security_format,           /* -Z */
951 +#endif
952 +    with_commas                        /* -m */
953    };
954  
955  static enum format format;
956 @@ -679,6 +700,11 @@
957    SHOW_CONTROL_CHARS_OPTION,
958    SI_OPTION,
959    SORT_OPTION,
960 +#ifdef WITH_SELINUX
961 +  CONTEXT_OPTION,
962 +  LCONTEXT_OPTION,
963 +  SCONTEXT_OPTION,
964 +#endif
965    TIME_OPTION,
966    TIME_STYLE_OPTION
967  };
968 @@ -722,6 +748,11 @@
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},
972 +#ifdef WITH_SELINUX
973 +  {"context", no_argument, 0, CONTEXT_OPTION},
974 +  {"lcontext", no_argument, 0, LCONTEXT_OPTION},
975 +  {"scontext", no_argument, 0, SCONTEXT_OPTION},
976 +#endif
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[] =
982  {
983    "verbose", "long", "commas", "horizontal", "across",
984 -  "vertical", "single-column", 0
985 +  "vertical", "single-column", 
986 +#ifdef WITH_SELINUX
987 +  "context",
988 +#endif
989 +  0
990  };
991  
992  static enum format const format_types[] =
993  {
994    long_format, long_format, with_commas, horizontal, horizontal,
995 +#ifdef WITH_SELINUX
996 +  security_format,
997 +#endif
998    many_per_line, one_per_line
999  };
1000  
1001 @@ -1101,6 +1139,9 @@
1002  
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
1007 +#endif
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;
1014  
1015 +#ifdef WITH_SELINUX
1016 +  /* 1 iff kernel has new selinux system calls */
1017 +  selinux_enabled= (is_selinux_enabled()>0);
1018 +#endif
1019 +
1020    qmark_funny_chars = 0;
1021  
1022    /* initialize all switches to default settings */
1023 @@ -1273,6 +1319,9 @@
1024    all_files = 0;
1025    really_all_files = 0;
1026    ignore_patterns = 0;
1027 +#ifdef WITH_SELINUX
1028 +  print_scontext       = 0;
1029 +#endif
1030  
1031    /* FIXME: put this in a function.  */
1032    {
1033 @@ -1350,7 +1399,7 @@
1034    }
1035  
1036    while ((c = getopt_long (argc, argv,
1037 -                          "abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1",
1038 +                          "abcdfghiklmnopqrstuvw:xABCDFGHI:LNQRST:UX1Z",
1039                            long_options, NULL)) != -1)
1040      {
1041        switch (c)
1042 @@ -1470,6 +1519,13 @@
1043           format = horizontal;
1044           break;
1045  
1046 +#ifdef WITH_SELINUX
1047 +       case 'Z':
1048 +         check_selinux();
1049 +         print_scontext = 1;
1050 +         format = security_format;
1051 +         break;
1052 +#endif
1053         case 'A':
1054           really_all_files = 0;
1055           all_files = 1;
1056 @@ -1637,6 +1693,25 @@
1057  
1058         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
1059  
1060 +#ifdef WITH_SELINUX
1061 +
1062 +       case CONTEXT_OPTION: /* new security format */
1063 +               check_selinux();
1064 +               print_scontext = 1;
1065 +               format = security_format;
1066 +               break;
1067 +       case LCONTEXT_OPTION: /* long format plus security context */
1068 +               check_selinux();
1069 +               print_scontext = 1;
1070 +               format = long_format;
1071 +               break;
1072 +       case SCONTEXT_OPTION: /* short form of new security format */
1073 +               check_selinux();
1074 +               print_scontext = 0;
1075 +               format = security_format;
1076 +               break;
1077 +#endif
1078 +
1079         default:
1080           usage (EXIT_FAILURE);
1081         }
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;
1090 +      }
1091 +#endif
1092      }
1093  
1094    files_index = 0;
1095 @@ -2336,6 +2417,9 @@
1096    f->linkname = 0;
1097    f->linkmode = 0;
1098    f->linkok = 0;
1099 +#ifdef WITH_SELINUX
1100 +  f->scontext = NULL;
1101 +#endif
1102  
1103    if (explicit_arg
1104        || format_needs_stat
1105 @@ -2381,6 +2465,11 @@
1106             {
1107               int need_lstat;
1108               err = stat (path, &f->stat);
1109 +#ifdef WITH_SELINUX
1110 +             if (err>=0) 
1111 +               if (selinux_enabled && (format == security_format || print_scontext))
1112 +                 getfilecon(path, &f->scontext);
1113 +#endif
1114  
1115               if (dereference == DEREF_COMMAND_LINE_ARGUMENTS)
1116                 break;
1117 @@ -2399,6 +2488,11 @@
1118  
1119         default: /* DEREF_NEVER */
1120           err = lstat (path, &f->stat);
1121 +#ifdef WITH_SELINUX
1122 +         if (err>=0) 
1123 +           if (selinux_enabled && (format == security_format || print_scontext))
1124 +             lgetfilecon(path, &f->scontext);
1125 +#endif
1126           break;
1127         }
1128  
1129 @@ -2893,6 +2987,16 @@
1130           DIRED_PUTCHAR ('\n');
1131         }
1132        break;
1133 +
1134 +#ifdef WITH_SELINUX
1135 +    case security_format:
1136 +      for (i = 0; i < files_index; i++)
1137 +      {
1138 +        print_scontext_format (files + i);
1139 +        DIRED_PUTCHAR ('\n');
1140 +      }
1141 +      break;
1142 +#endif
1143      }
1144  }
1145  
1146 @@ -3117,6 +3221,14 @@
1147    }
1148    p += sizeof modebuf + nlink_width + 1;
1149  
1150 +#ifdef WITH_SELINUX
1151 +
1152 +  if ( print_scontext ) {
1153 +    sprintf (p, "%-32s ", f->scontext);
1154 +    p += strlen (p);
1155 +  }
1156 +#endif
1157 +
1158    DIRED_INDENT ();
1159  
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\
1164  "), stdout);
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\
1173 +\n\n"));
1174 +#endif
1175        fputs (HELP_OPTION_DESCRIPTION, stdout);
1176        fputs (VERSION_OPTION_DESCRIPTION, stdout);
1177        fputs (_("\n\
1178 @@ -4055,3 +4177,79 @@
1179      }
1180    exit (status);
1181  }
1182 +
1183 +#ifdef WITH_SELINUX
1184 +
1185 +static void
1186 +print_scontext_format (const struct fileinfo *f)
1187 +{
1188 +  char modebuf[12];
1189 +
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.  */
1194 +
1195 +  char init_bigbuf[7 * LONGEST_HUMAN_READABLE + 10  + 9 + 1];
1196 +  char *buf = init_bigbuf;
1197 +  size_t bufsize = sizeof (init_bigbuf);
1198 +  size_t s;
1199 +  char *p;
1200 +  const char *fmt;
1201 +  char *user_name;
1202 +  char *group_name;
1203 +  int rv;
1204 +  char *scontext;
1205 +
1206 +  p = buf;
1207 +
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';
1212 +
1213 +    /* print mode */
1214 +
1215 +    (void) sprintf (p, "%s ", modebuf);
1216 +    p += strlen (p);
1217 +
1218 +    /* print standard user and group */
1219 +
1220 +    user_name = (numeric_ids ? NULL : getuser (f->stat.st_uid));
1221 +    if (user_name)
1222 +      (void) sprintf (p, "%-8.8s ", user_name);
1223 +    else
1224 +      (void) sprintf (p, "%-8u ", (unsigned int) f->stat.st_uid);
1225 +    p += strlen (p);
1226 +
1227 +    if ( print_group ) {
1228 +      group_name = (numeric_ids ? NULL : getgroup (f->stat.st_gid));
1229 +      if (group_name)
1230 +       (void) sprintf (p, "%-8.8s ", group_name);
1231 +      else
1232 +       (void) sprintf (p, "%-8u ", (unsigned int) f->stat.st_gid);
1233 +      p += strlen (p);
1234 +    }
1235 +  }
1236 +
1237 +  (void) sprintf (p, "%-32s ", f->scontext);
1238 +  p += strlen (p);
1239
1240 +  DIRED_INDENT ();
1241 +  DIRED_FPUTS (buf, stdout, p - buf);
1242 +  print_name_with_quoting (f->name, f->stat.st_mode, f->linkok, &dired_obstack);
1243
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);
1250 +      }
1251 +  }
1252 +  else {
1253 +    if (indicator_style != none)
1254 +      print_type_indicator (f->stat.st_mode);
1255 +  }
1256 +}
1257 +#endif
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
1260 @@ -105,6 +105,9 @@
1261    int preserve_ownership;
1262    int preserve_mode;
1263    int preserve_timestamps;
1264 +#ifdef WITH_SELINUX
1265 +  int preserve_security_context;
1266 +#endif
1267  
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
1272 @@ -36,8 +36,15 @@
1273  /* The name this program was run with. */
1274  char *program_name;
1275  
1276 +#ifdef WITH_SELINUX
1277 +#include <selinux/selinux.h>
1278 +#endif
1279 +
1280  static struct option const longopts[] =
1281  {
1282 +#ifdef WITH_SELINUX
1283 +  {"context", required_argument, NULL, 'Z'},
1284 +#endif
1285    {"mode", required_argument, NULL, 'm'},
1286    {GETOPT_HELP_OPTION_DECL},
1287    {GETOPT_VERSION_OPTION_DECL},
1288 @@ -58,6 +65,11 @@
1289  Create the special file NAME of the given TYPE.\n\
1290  \n\
1291  "), stdout);
1292 +#ifdef WITH_SELINUX
1293 +      fputs(_("\
1294 +  -Z, --context=CONTEXT   set security context (quoted string)\n\
1295 +"), stdout);
1296 +#endif
1297        fputs (_("\
1298  Mandatory arguments to long options are mandatory for short options too.\n\
1299  "), stdout);
1300 @@ -103,7 +115,11 @@
1301  
1302    specified_mode = NULL;
1303  
1304 +#ifdef WITH_SELINUX
1305 +  while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
1306 +#else
1307    while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1)
1308 +#endif
1309      {
1310        switch (optc)
1311         {
1312 @@ -112,6 +128,19 @@
1313         case 'm':
1314           specified_mode = optarg;
1315           break;
1316 +#ifdef WITH_SELINUX
1317 +       case 'Z':
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") );
1321 +           exit( 1 );
1322 +         }
1323 +         if (setfscreatecon(optarg)) {
1324 +           fprintf( stderr, _("Sorry, cannot set default context to %s.\n"), optarg);
1325 +           exit( 1 );
1326 +         }
1327 +         break;
1328 +#endif
1329         case_GETOPT_HELP_CHAR;
1330         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
1331         default:
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
1334 @@ -32,11 +32,18 @@
1335  
1336  #define AUTHORS "David MacKenzie"
1337  
1338 +#ifdef WITH_SELINUX
1339 +#include <selinux/selinux.h>          /* for is_selinux_enabled() */
1340 +#endif
1341 +
1342  /* The name this program was run with. */
1343  char *program_name;
1344  
1345  static struct option const longopts[] =
1346  {
1347 +#ifdef WITH_SELINUX
1348 +  {"context", required_argument, NULL, 'Z'},
1349 +#endif
1350    {"mode", required_argument, NULL, 'm'},
1351    {GETOPT_HELP_OPTION_DECL},
1352    {GETOPT_VERSION_OPTION_DECL},
1353 @@ -57,6 +64,11 @@
1354  Create named pipes (FIFOs) with the given NAMEs.\n\
1355  \n\
1356  "), stdout);
1357 +#ifdef WITH_SELINUX
1358 +      printf (_("\
1359 +  -Z, --context=CONTEXT   set security context (quoted string)\n\
1360 +"), stdout);
1361 +#endif
1362        fputs (_("\
1363  Mandatory arguments to long options are mandatory for short options too.\n\
1364  "), stdout);
1365 @@ -93,7 +105,11 @@
1366  #ifndef S_ISFIFO
1367    error (EXIT_FAILURE, 0, _("fifo files not supported"));
1368  #else
1369 +#ifdef WITH_SELINUX
1370 +  while ((optc = getopt_long (argc, argv, "m:Z:", longopts, NULL)) != -1)
1371 +#else
1372    while ((optc = getopt_long (argc, argv, "m:", longopts, NULL)) != -1)
1373 +#endif
1374      {
1375        switch (optc)
1376         {
1377 @@ -102,6 +118,18 @@
1378         case 'm':
1379           specified_mode = optarg;
1380           break;
1381 +#ifdef WITH_SELINUX
1382 +       case 'Z':
1383 +         if( !(is_selinux_enabled()>0)) {
1384 +           fprintf( stderr, _("Sorry, --context (-Z) can be used only on a SELinux-enabled kernel.\n") );
1385 +           exit( 1 );
1386 +         }
1387 +         if (setfscreatecon(optarg)) {
1388 +           fprintf( stderr, _("Sorry, cannot set default context to %s.\n"), optarg);
1389 +           exit( 1 );
1390 +         }
1391 +         break;
1392 +#endif
1393         case_GETOPT_HELP_CHAR;
1394         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
1395         default:
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
1398 @@ -3,13 +3,13 @@
1399  EXTRA_PROGRAMS = chroot df hostid nice pinky stty su uname uptime users who
1400  
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)
1413  
1414 @@ -32,13 +32,20 @@
1415  # replacement functions defined in libfetish.a.
1416  LDADD = ../lib/libfetish.a $(LIBINTL) ../lib/libfetish.a
1417  
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@
1438  
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
1443 @@ -0,0 +1,423 @@
1444 +/* chcontext -- change security context of a pathname */
1445 +
1446 +#include <config.h>
1447 +#include <stdio.h>
1448 +#include <sys/types.h>
1449 +#include <grp.h>
1450 +#include <getopt.h>
1451 +#include <selinux/selinux.h>
1452 +#include <selinux/context.h>
1453 +
1454 +#include "system.h"
1455 +#include "error.h"
1456 +#include "savedir.h"
1457 +#include "group-member.h"
1458 +
1459 +enum Change_status
1460 +{
1461 +  CH_SUCCEEDED,
1462 +  CH_FAILED,
1463 +  CH_NO_CHANGE_REQUESTED
1464 +};
1465 +
1466 +enum Verbosity
1467 +{
1468 +  /* Print a message for each file that is processed.  */
1469 +  V_high,
1470 +
1471 +  /* Print a message for each file whose attributes we change.  */
1472 +  V_changes_only,
1473 +
1474 +  /* Do not be verbose.  This is the default. */
1475 +  V_off
1476 +};
1477 +
1478 +static int change_dir_context (const char *dir, const struct stat *statp);
1479 +
1480 +/* The name the program was run with. */
1481 +char *program_name;
1482 +
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;
1486 +
1487 +/* If nonzero, change the context of directories recursively. */
1488 +static int recurse;
1489 +
1490 +/* If nonzero, force silence (no error messages). */
1491 +static int force_silent;
1492 +
1493 +/* Level of verbosity.  */
1494 +static enum Verbosity verbosity = V_off;
1495 +
1496 +/* The name of the context file is being given. */
1497 +static const char *specified_context;
1498 +
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;
1504 +
1505 +/* The argument to the --reference option.  Use the context of this file.
1506 +   This file must exist.  */
1507 +static char *reference_file;
1508 +
1509 +/* If nonzero, display usage information and exit.  */
1510 +static int show_help;
1511 +
1512 +/* If nonzero, print the version on standard output and exit.  */
1513 +static int show_version;
1514 +
1515 +static struct option const long_options[] =
1516 +{
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},
1531 +  {0, 0, 0, 0}
1532 +};
1533 +
1534 +/* Tell the user how/if the context of FILE has been changed.
1535 +   CHANGED describes what (if anything) has happened. */
1536 +
1537 +static void
1538 +describe_change (const char *file, security_context_t newcontext, enum Change_status changed)
1539 +{
1540 +  const char *fmt;
1541 +  switch (changed)
1542 +    {
1543 +    case CH_SUCCEEDED:
1544 +      fmt = _("context of %s changed to %s\n");
1545 +      break;
1546 +    case CH_FAILED:
1547 +      fmt = _("failed to change context of %s to %s\n");
1548 +      break;
1549 +    case CH_NO_CHANGE_REQUESTED:
1550 +      fmt = _("context of %s retained as %s\n");
1551 +      break;
1552 +    default:
1553 +      abort ();
1554 +    }
1555 +  printf (fmt, file, newcontext);
1556 +}
1557 +
1558 +static int
1559 +compute_context_from_mask (security_context_t context, context_t *ret)
1560 +{
1561 +  context_t newcontext = context_new (context);
1562 +  if (!newcontext)
1563 +    return 1;
1564 +#define SETCOMPONENT(comp) \
1565 +  do { \
1566 +    if (specified_ ## comp) \
1567 +      if (context_ ## comp ## _set (newcontext, specified_ ## comp)) \
1568 +        goto lose; \
1569 +  } while (0)
1570 +      
1571 +  SETCOMPONENT(user);
1572 +  SETCOMPONENT(range);
1573 +  SETCOMPONENT(role);
1574 +  SETCOMPONENT(type);
1575 +#undef SETCOMPONENT
1576 +  
1577 +  *ret = newcontext;
1578 +  return 0;
1579 + lose:
1580 +  context_free (newcontext);
1581 +  return 1;
1582 +}
1583 +
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. */
1587 +
1588 +static int
1589 +change_file_context (const char *file)
1590 +{
1591 +  struct stat file_stats;
1592 +  security_context_t file_context=NULL;
1593 +  context_t context;
1594 +  security_context_t context_string;
1595 +  int errors = 0;
1596 +  int status = 0;
1597 +
1598 +  if (change_symlinks)
1599 +    status = lgetfilecon(file, &file_context);
1600 +  else 
1601 +    status = getfilecon(file, &file_context);
1602 +
1603 +  if ((status < 0) && (errno != ENODATA))
1604 +    {
1605 +      if (force_silent == 0)
1606 +       error (0, errno, "%s", file);
1607 +      return 1;
1608 +    }
1609 +
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)
1614 +    {
1615 +      error (0, 0, _("can't apply partial context to unlabeled file %s"), file);
1616 +      return 1;
1617 +    }
1618 +      
1619 +  if (specified_context == NULL)
1620 +    {
1621 +      if (compute_context_from_mask (file_context, &context))
1622 +       {
1623 +         error (0, 0, _("couldn't compute security context from %s"), file_context);
1624 +             return 1;
1625 +       }
1626 +    }
1627 +  else
1628 +    {
1629 +      context = context_new (specified_context);
1630 +      if (!context)
1631 +       error (1, 0,_("invalid context: %s"),specified_context);            
1632 +    }
1633 +
1634 +  context_string = context_str (context);
1635 +      
1636 +  if (file_context == NULL || strcmp(context_string,file_context)!=0)
1637 +    {
1638 +      int fail;
1639 +
1640 +      if (change_symlinks)
1641 +       fail = lsetfilecon (file, context_string);
1642 +      else
1643 +       fail = setfilecon (file, context_string);
1644 +
1645 +      if (verbosity == V_high || (verbosity == V_changes_only && !fail))
1646 +       describe_change (file, context_string, (fail ? CH_FAILED : CH_SUCCEEDED));
1647 +
1648 +      if (fail)
1649 +       {
1650 +         errors = 1;
1651 +         if (force_silent == 0)
1652 +           {
1653 +             error (0, errno, _("failed to change context of %s to %s"), file, context_string);
1654 +           }
1655 +       }
1656 +    }
1657 +  else if (verbosity == V_high)
1658 +    {
1659 +      describe_change (file, context_string, CH_NO_CHANGE_REQUESTED);
1660 +    }
1661 +
1662 +  context_free(context);
1663 +  freecon(file_context);
1664 +
1665 +  if (recurse) {
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);
1671 +  }
1672 +  return errors;
1673 +}
1674 +
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. */
1679 +
1680 +static int
1681 +change_dir_context (const char *dir, const struct stat *statp)
1682 +{
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'. */
1688 +  int errors = 0;
1689 +
1690 +  errno = 0;
1691 +  name_space = savedir (dir);
1692 +  if (name_space == NULL)
1693 +    {
1694 +      if (errno)
1695 +        {
1696 +         if (force_silent == 0)
1697 +           error (0, errno, "%s", dir);
1698 +         return 1;
1699 +       }
1700 +      else
1701 +       error (1, 0, _("virtual memory exhausted"));
1702 +    }
1703 +
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] = '/';
1710 +
1711 +  for (namep = name_space; *namep; namep += filelength - dirlength)
1712 +    {
1713 +      filelength = dirlength + strlen (namep) + 1;
1714 +      if (filelength > pathlength)
1715 +       {
1716 +         pathlength = filelength * 2;
1717 +         path = xrealloc (path, pathlength);
1718 +       }
1719 +      strcpy (path + dirlength, namep);
1720 +      errors |= change_file_context (path);
1721 +    }
1722 +  free (path);
1723 +  free (name_space);
1724 +  return errors;
1725 +}
1726 +
1727 +static void
1728 +usage (int status)
1729 +{
1730 +  if (status != 0)
1731 +    fprintf (stderr, _("Try `%s --help' for more information.\n"),
1732 +            program_name);
1733 +  else
1734 +    {
1735 +      printf (_("\
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\
1739 +"),
1740 +       program_name, program_name, program_name);
1741 +      printf (_("\
1742 +Change the security context of each FILE to CONTEXT.\n\
1743 +\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\
1757 +"));
1758 +      close_stdout ();
1759 +    }
1760 +  exit (status);
1761 +}
1762 +
1763 +int
1764 +main (int argc, char **argv)
1765 +{
1766 +  security_context_t ref_context = NULL;
1767 +  int errors = 0;
1768 +  int optc;
1769 +  int component_specified = 0;
1770 +  
1771 +  program_name = argv[0];
1772 +  setlocale (LC_ALL, "");
1773 +  bindtextdomain (PACKAGE, LOCALEDIR);
1774 +  textdomain (PACKAGE);
1775 +
1776 +  recurse = force_silent = 0;
1777 +  
1778 +  while ((optc = getopt_long (argc, argv, "Rcfhvu:r:t:l:", long_options, NULL)) != -1)
1779 +  {
1780 +         switch (optc)
1781 +         {
1782 +         case 0:
1783 +           break;
1784 +         case 'u':
1785 +           specified_user = optarg;
1786 +           component_specified = 1;
1787 +           break;
1788 +         case 'r':
1789 +           specified_role = optarg;
1790 +           component_specified = 1;
1791 +           break;
1792 +         case 't':
1793 +           specified_type = optarg;
1794 +           component_specified = 1;
1795 +           break;
1796 +         case 'l':
1797 +           specified_range = optarg;
1798 +           component_specified = 1;
1799 +           break;
1800 +         case CHAR_MAX + 1:
1801 +                 reference_file = optarg;
1802 +                 break;
1803 +         case 'R':
1804 +                 recurse = 1;
1805 +                 break;
1806 +         case 'c':
1807 +                 verbosity = V_changes_only;
1808 +                 break;
1809 +         case 'f':
1810 +                 force_silent = 1;
1811 +                 break;
1812 +         case 'h':
1813 +                 change_symlinks = 1;
1814 +                 break;
1815 +         case 'v':
1816 +                 verbosity = V_high;
1817 +                 break;
1818 +         default:
1819 +                 usage (1);
1820 +         }
1821 +  }
1822 +
1823 +  if (show_version)
1824 +  {
1825 +     printf ("chcon (%s) %s\n", GNU_PACKAGE, VERSION);
1826 +     close_stdout ();
1827 +     exit (0);
1828 +  }
1829 +
1830 +  if (show_help)
1831 +    usage (0);
1832 +
1833 +  
1834 +  if (reference_file && component_specified)
1835 +    {
1836 +      error (0, 0, _("conflicting security context specifiers given"));
1837 +      usage (1);
1838 +    }
1839 +
1840 +  if (!(((reference_file || component_specified)
1841 +        && (argc - optind > 0))
1842 +       || (argc - optind > 1)))
1843 +    {
1844 +      error (0, 0, _("too few arguments"));
1845 +      usage (1);
1846 +    }
1847 +  
1848 +  if (reference_file)
1849 +    {
1850 +      if (getfilecon (reference_file, &ref_context)<0)
1851 +       error (1, errno, "%s", reference_file);
1852 +      
1853 +      specified_context = ref_context;
1854 +    }
1855 +  else if (!component_specified) {
1856 +    specified_context = argv[optind++];
1857 +  }
1858 +  for (; optind < argc; ++optind)
1859 +     errors |= change_file_context (argv[optind]);
1860 +
1861 +  if (verbosity != V_off)
1862 +    close_stdout ();
1863 +  if (ref_context != NULL)
1864 +    freecon(ref_context);
1865 +  exit (errors);
1866 +}
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
1869 @@ -42,6 +42,11 @@
1870  #include "utimens.h"
1871  #include "xreadlink.h"
1872  
1873 +#ifdef WITH_SELINUX
1874 +#include <selinux/selinux.h>          /* for is_selinux_enabled() */
1875 +extern int  selinux_enabled;
1876 +#endif
1877 +
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;
1884  
1885 +#ifdef WITH_SELINUX
1886 +  if (x->preserve_security_context && selinux_enabled)
1887 +    {
1888 +      security_context_t con;
1889 +
1890 +      if (lgetfilecon (src_path, &con) >= 0)
1891 +       {
1892 +         if (setfscreatecon(con) < 0) 
1893 +           {
1894 +             error (0, errno, _("cannot set setfscreatecon %s"), quote (con));
1895 +             if (x->require_preserve) {
1896 +               freecon(con);
1897 +               return 1;
1898 +             }
1899 +           }
1900 +         freecon(con);
1901 +       }
1902 +      else {
1903 +       if ( errno == ENOTSUP ) {
1904 +         error (0, errno, _("warning: security context not preserved %s"), quote (src_path));
1905 +       } else {
1906 +         error (0, errno, _("cannot lgetfilecon %s"), quote (src_path));
1907 +         return 1;
1908 +       }
1909 +      }
1910 +  }
1911 +#endif
1912 +
1913    if (S_ISDIR (src_mode))
1914      {
1915        struct dir_list *dir;
1916 @@ -1357,8 +1390,13 @@
1917         }
1918  
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);
1925 +#endif
1926         return 0;
1927 +      }
1928  
1929        /* Copy the contents of the directory.  */
1930  
1931 @@ -1491,6 +1529,11 @@
1932             }
1933         }
1934  
1935 +#ifdef WITH_SELINUX
1936 +      if (x->preserve_security_context && selinux_enabled)
1937 +       setfscreatecon(NULL);
1938 +#endif
1939 +
1940        /* There's no need to preserve timestamps or permissions.  */
1941        preserve_metadata = 0;
1942  
1943 @@ -1523,7 +1566,7 @@
1944    if (command_line_arg)
1945      record_file (x->dest_info, dst_path, NULL);
1946  
1947 -  if ( ! preserve_metadata)
1948 +  if ( ! preserve_metadata) 
1949      return 0;
1950  
1951    /* POSIX says that `cp -p' must restore the following:
1952 @@ -1629,6 +1672,11 @@
1953  
1954  un_backup:
1955  
1956 +#ifdef WITH_SELINUX
1957 +  if (x->preserve_security_context && selinux_enabled)
1958 +    setfscreatecon(NULL);
1959 +#endif
1960 +
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
1966 @@ -45,6 +45,20 @@
1967  
1968  int getugroups ();
1969  
1970 +#ifdef WITH_SELINUX
1971 +#include <selinux/selinux.h>
1972 +static void print_context (char* context);
1973 +/* Print the SELinux context */
1974 +static void
1975 +print_context(char *context)
1976 +{
1977 +  printf ("%s", context);
1978 +}
1979 +
1980 +/* If nonzero, output only the SELinux context. -Z */
1981 +static int just_context = 0;
1982 +
1983 +#endif
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);
1987 @@ -63,8 +77,14 @@
1988  /* Nonzero if errors have been encountered.  */
1989  static int problems = 0;
1990  
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;
1995 +
1996  static struct option const longopts[] =
1997  {
1998 +  {"context", no_argument, NULL, 'Z'},
1999    {"group", no_argument, NULL, 'g'},
2000    {"groups", no_argument, NULL, 'G'},
2001    {"name", no_argument, NULL, 'n'},
2002 @@ -88,6 +108,7 @@
2003  Print information for USERNAME, or the current user.\n\
2004  \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\
2010 @@ -109,6 +130,7 @@
2011  main (int argc, char **argv)
2012  {
2013    int optc;
2014 +  int selinux_enabled=(is_selinux_enabled()>0);
2015  
2016    /* If nonzero, output the list of all group IDs. -G */
2017    int just_group_list = 0;
2018 @@ -127,7 +149,7 @@
2019  
2020    atexit (close_stdout);
2021  
2022 -  while ((optc = getopt_long (argc, argv, "agnruG", longopts, NULL)) != -1)
2023 +  while ((optc = getopt_long (argc, argv, "agnruGZ", longopts, NULL)) != -1)
2024      {
2025        switch (optc)
2026         {
2027 @@ -136,6 +158,16 @@
2028         case 'a':
2029           /* Ignore -a, for compatibility with SVR4.  */
2030           break;
2031 +#ifdef WITH_SELINUX
2032 +        case 'Z':
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") );
2036 +           exit( 1 );
2037 +         }
2038 +          just_context = 1;
2039 +          break;
2040 +#endif
2041         case 'g':
2042           just_group = 1;
2043           break;
2044 @@ -158,8 +192,28 @@
2045         }
2046      }
2047  
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;
2053 +
2054 +  if( just_context  && !selinux_enabled)
2055 +    error (1, 0, _("\
2056 +cannot display context when SELinux not enabled or when displaying the id\n\
2057 +of a different user"));
2058 +
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 )
2064 +    {
2065 +      if (getcon(&context))
2066 +        error (1, 0, _("can't get process context"));
2067 +    }
2068 +#endif
2069 +
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"));
2072  
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);
2082 +#endif
2083    else
2084      print_full_info (argv[optind]);
2085    putchar ('\n');
2086 @@ -397,4 +453,9 @@
2087      free (groups);
2088    }
2089  #endif /* HAVE_GETGROUPS */
2090 +#ifdef WITH_SELINUX
2091 +  if ( context != NULL ) {
2092 +    printf(_(" context=%s"),context);
2093 +  }
2094 +#endif
2095  }
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
2098 @@ -34,6 +34,11 @@
2099  #include "quote.h"
2100  #include "remove.h"
2101  
2102 +#ifdef WITH_SELINUX
2103 +#include <selinux/selinux.h>          /* for is_selinux_enabled() */
2104 +int selinux_enabled=0;
2105 +#endif
2106 +
2107  /* The official name of this program (e.g., no `g' prefix).  */
2108  #define PROGRAM_NAME "mv"
2109  
2110 @@ -124,6 +129,9 @@
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;
2116 +#endif
2117    x->require_preserve = 0;  /* FIXME: maybe make this an option */
2118    x->recursive = 1;
2119    x->sparse_mode = SPARSE_AUTO;  /* FIXME: maybe make this an option */
2120 @@ -376,6 +384,10 @@
2121  
2122    cp_option_init (&x);
2123  
2124 +#ifdef WITH_SELINUX
2125 +  selinux_enabled= (is_selinux_enabled()>0);
2126 +#endif
2127 +
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
2133 @@ -0,0 +1,174 @@
2134 +/*
2135 + * runcon [ context |
2136 + *         ( [ -r role ] [-t type] [ -u user ] [ -l levelrange ] )
2137 + *         command [arg1 [arg2 ...] ]
2138 + *
2139 + * attempt to run the specified command with the specified context.
2140 + * 
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
2145 + *
2146 + * Contexts are interpreted as follows:
2147 + *
2148 + * Number of       MLS
2149 + * components    system?
2150 + *
2151 + *     1            -         type
2152 + *     2            -         role:type
2153 + *     3            Y         role:type:range
2154 + *     3            N         user:role:type
2155 + *     4            Y         user:role:type:range
2156 + *     4            N         error
2157 + */
2158 +
2159 +#include <config.h>
2160 +#include <unistd.h>
2161 +#include <stdio.h>
2162 +#include <getopt.h>
2163 +#include <selinux/context.h>
2164 +#include <selinux/selinux.h>
2165 +#include <errno.h>
2166 +#include "system.h"
2167 +extern int errno;
2168 +
2169 +/* The name the program was run with. */
2170 +char *program_name;
2171 +
2172 +void
2173 +usage(char *str)
2174 +{
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"
2180 +         "  -r            role\n"
2181 +         "  -l            levelrange\n"
2182 +         "    --help      display this help and exit\n"),
2183 +         program_name);
2184 +  exit(1);
2185 +}
2186 +
2187 +int 
2188 +main(int argc,char **argv,char **envp )
2189 +{
2190 +  char *role    = 0;
2191 +  char *range   = 0;
2192 +  char *user    = 0;
2193 +  char *type    = 0;
2194 +  char *context = NULL;
2195 +  security_context_t cur_context = NULL;
2196 +
2197 +  context_t      con;
2198 +
2199 +  program_name = argv[0];
2200 +  setlocale (LC_ALL, "");
2201 +  bindtextdomain (PACKAGE, LOCALEDIR);
2202 +  textdomain (PACKAGE);
2203 +  
2204 +  while (1) {
2205 +    int c;
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, '?' },
2214 +      { 0, 0, 0, 0 }
2215 +    };
2216 +    c = getopt_long(argc, argv, "s:r:t:u:l:?", long_options, &option_index);
2217 +    if ( c == -1 ) {
2218 +      break;
2219 +    }
2220 +    switch ( c ) {
2221 +    case 'r':
2222 +      if ( role ) {
2223 +       fprintf(stderr,_("multiple roles\n"));
2224 +       exit(1);
2225 +      }
2226 +      role = optarg;
2227 +      break;
2228 +    case 't':
2229 +      if ( type ) {
2230 +       fprintf(stderr,_("multiple types\n"));
2231 +       exit(1);
2232 +      }
2233 +      type = optarg;
2234 +      break;
2235 +    case 'u':
2236 +      if ( user ) {
2237 +       fprintf(stderr,_("multiple users\n"));
2238 +       exit(1);
2239 +      }
2240 +      user = optarg;
2241 +      break;
2242 +    case 'l':
2243 +      if ( range ) {
2244 +       fprintf(stderr,_("multiple levelranges\n"));
2245 +       exit(1);
2246 +      }
2247 +      range = optarg;
2248 +      break;
2249 +    default:
2250 +      fprintf(stderr,_("unrecognised option %c\n"),c);
2251 +    case '?':
2252 +      usage(0);
2253 +      break;
2254 +    }
2255 +  }
2256 +  if ( !(user || role || type || range)) {
2257 +    if ( optind >= argc ) {
2258 +      usage(_("must specify -t, -u, -l, -r, or context"));
2259 +    }
2260 +    context = argv[optind++];
2261 +  }
2262 +  
2263 +  if ( optind >= argc ) {
2264 +    usage(_("no command found"));
2265 +  }
2266 +
2267 +  if ( context ) {
2268 +    con = context_new(context);
2269 +    if (!con) {
2270 +      fprintf(stderr,_("%s is not a valid context\n"), context);
2271 +      exit(1);
2272 +    }
2273 +  }
2274 +  else {
2275 +    getcon(&cur_context);
2276 +    con = context_new(cur_context);
2277 +    if (!con) {
2278 +      fprintf(stderr,_("%s is not a valid context\n"), context);
2279 +      exit(1);
2280 +    }
2281 +    if ( user ) {
2282 +      context_user_set(con,user);
2283 +    }
2284 +    if ( type ) {
2285 +      context_type_set(con,type);
2286 +    }
2287 +    if ( range ) {
2288 +      context_range_set(con,range);
2289 +    }
2290 +    if ( role ) {
2291 +      context_role_set(con,role);
2292 +    }
2293 +  }
2294 +  
2295 +  if (setexeccon(context_str(con))!=0) {
2296 +    fprintf(stderr,_("unable to setup security context %s\n"), context_str(con));
2297 +    exit(1);
2298 +  }
2299 +  if (cur_context!=NULL) 
2300 +    freecon(cur_context);
2301 +
2302 +  if ( execvp(argv[optind],argv+optind) ) {
2303 +    perror("execvp");
2304 +    exit(1);
2305 +  }
2306 +  return 1; /* can't reach this statement.... */
2307 +}
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
2310 @@ -47,6 +47,11 @@
2311  # include <sys/wait.h>
2312  #endif
2313  
2314 +#ifdef WITH_SELINUX
2315 +#include <selinux/selinux.h>          /* for is_selinux_enabled() */
2316 +int selinux_enabled=0;
2317 +#endif
2318 +
2319  struct passwd *getpwnam ();
2320  struct group *getgrnam ();
2321  
2322 @@ -123,11 +128,17 @@
2323  static struct option const long_options[] =
2324  {
2325    {"backup", optional_argument, NULL, 'b'},
2326 +#ifdef WITH_SELINUX
2327 +  {"context", required_argument, NULL, 'Z'},
2328 +#endif
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'},
2336 +#endif
2337    {"strip", no_argument, NULL, 's'},
2338    {"suffix", required_argument, NULL, 'S'},
2339    {"version-control", required_argument, NULL, 'V'}, /* Deprecated. FIXME. */
2340 @@ -244,6 +255,9 @@
2341  
2342    x->update = 0;
2343    x->verbose = 0;
2344 +#ifdef WITH_SELINUX
2345 +  x->preserve_security_context = 0;
2346 +#endif
2347    x->dest_info = NULL;
2348    x->src_info = NULL;
2349  }
2350 @@ -261,6 +275,11 @@
2351    struct cp_options x;
2352    int n_files;
2353    char **file;
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);
2358 +#endif
2359  
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");
2365  
2366 +#ifdef WITH_SELINUX
2367 +  while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPvV:S:Z:", long_options,
2368 +#else
2369    while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pvV:S:", long_options,
2370 +#endif
2371                               NULL)) != -1)
2372      {
2373        switch (optc)
2374 @@ -335,6 +358,37 @@
2375           make_backups = 1;
2376           backup_suffix_string = optarg;
2377           break;
2378 +#ifdef WITH_SELINUX
2379 +       case 'P':
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") );
2383 +           break;
2384 +         }
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);
2387 +           exit( 1 );
2388 +         }
2389 +         x.preserve_security_context = 1;
2390 +         break ;
2391 +       case 'Z':
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") );
2395 +           break;
2396 +         }
2397 +         if ( x.preserve_security_context ) {
2398 +
2399 +                   (void) fprintf(stderr, _("%s: cannot force target context == '%s' and preserve it\n"), argv[0], optarg);
2400 +           exit( 1 );
2401 +         }
2402 +         scontext = optarg;
2403 +         if (setfscreatecon(scontext)) {
2404 +           (void) fprintf(stderr, _("%s: cannot setup default context == '%s'\n"), argv[0], scontext);
2405 +           exit(1);
2406 +         }
2407 +         break;
2408 +#endif
2409         case_GETOPT_HELP_CHAR;
2410         case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
2411         default:
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\
2415  "), stdout);
2416 +      fputs (_("\
2417 +  -P, --preserve_context (SELinux) Preserve security context\n\
2418 +  -Z, --context=CONTEXT  (SELinux) Set security context of files and directories\n\
2419 +"), stdout);
2420 +
2421        fputs (HELP_OPTION_DESCRIPTION, stdout);
2422        fputs (VERSION_OPTION_DESCRIPTION, stdout);
2423        fputs (_("\
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
2426 @@ -22,6 +22,7 @@
2427  
2428  src/basename.c
2429  src/cat.c
2430 +src/chcon.c
2431  src/chgrp.c
2432  src/chmod.c
2433  src/chown-core.c
2434 @@ -79,6 +80,7 @@
2435  src/remove.c
2436  src/rm.c
2437  src/rmdir.c
2438 +src/runcon.c
2439  src/seq.c
2440  src/shred.c
2441  src/sleep.c
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"
2447  
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
2450  #, c-format
2451  msgid "cannot create directory %s"
2452  msgstr "nie mo¿na utworzyæ katalogu %s"
2453  
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
2456  #, c-format
2457  msgid "%s exists but is not a directory"
2458  msgstr "%s istnieje, ale nie jest katalogiem"
2459 @@ -178,7 +178,7 @@
2460  msgid "cannot chdir to directory %s"
2461  msgstr "nie mo¿na przej¶æ do katalogu %s"
2462  
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
2465  #, c-format
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."
2471  
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
2490 -#: src/yes.c:42
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
2510  #, c-format
2511  msgid "Try `%s --help' for more information.\n"
2512  msgstr "Spróbuj `%s --help' dla uzyskania informacji.\n"
2513 @@ -433,22 +433,22 @@
2514  "\n"
2515  
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
2542  #, c-format
2543 @@ -459,19 +459,20 @@
2544  "\n"
2545  "Raporty o b³êdach wysy³aj do %s .\n"
2546  
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
2559 +#: src/unlink.c:89
2560  msgid "too few arguments"
2561  msgstr "za ma³o argumentów"
2562  
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
2569  #: src/who.c:805
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"
2575  
2576 +#: src/chcon.c:101
2577 +#, c-format
2578 +msgid "context of %s changed to %s\n"
2579 +msgstr "kontekst %s zmieniony na %s\n"
2580 +
2581 +#: src/chcon.c:104
2582 +#, c-format
2583 +msgid "failed to change context of %s to %s\n"
2584 +msgstr "nie mo¿na zmieniæ kontekstu %s na %s\n"
2585 +
2586 +#: src/chcon.c:107
2587 +#, c-format
2588 +msgid "context of %s retained as %s\n"
2589 +msgstr "kontekst %s zachowany jako %s\n"
2590 +
2591 +#: src/chcon.c:172
2592 +#, c-format
2593 +msgid "can't apply partial context to unlabeled file %s"
2594 +msgstr "nie mo¿na zastosowaæ czê¶ciowego kontekstu na nieoznakowanym pliku %s"
2595 +
2596 +#: src/chcon.c:180
2597 +#, c-format
2598 +msgid "couldn't compute security context from %s"
2599 +msgstr "nie mo¿na obliczyæ kontekstu bezpieczeñstwa z %s"
2600 +
2601 +#: src/chcon.c:188
2602 +#, c-format
2603 +msgid "invalid context: %s"
2604 +msgstr "b³êdny kontekst: %s"
2605 +
2606 +#: src/chcon.c:210
2607 +#, c-format
2608 +msgid "failed to change context of %s to %s"
2609 +msgstr "nie mo¿na zmieniæ kontekstu %s na %s"
2610 +
2611 +#: src/chcon.c:258
2612 +msgid "virtual memory exhausted"
2613 +msgstr "pamiêæ wirtualna wyczerpana"
2614 +
2615 +#: src/chcon.c:292
2616 +#, c-format
2617 +msgid ""
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"
2621 +msgstr ""
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"
2625 +
2626 +#: src/chcon.c:298
2627 +#, c-format
2628 +msgid ""
2629 +"Change the security context of each FILE to CONTEXT.\n"
2630 +"\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"
2644 +msgstr ""
2645 +"Zmiana kontekstu bezpieczeñstwa ka¿dego PLIKU na KONTEKST.\n"
2646 +"\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"
2660 +
2661 +#: src/chcon.c:393
2662 +msgid "conflicting security context specifiers given"
2663 +msgstr "konflikt miêdzy podanymi okre¶leniami kontekstu bezpieczeñstwa"
2664 +
2665  #: src/chgrp.c:86
2666  msgid "cannot change to null group"
2667  msgstr "nie mo¿na zmieniæ grupy na pust±"
2668 @@ -658,7 +748,8 @@
2669  "\n"
2670  
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
2675  #, c-format
2676  msgid "failed to get attributes of %s"
2677  msgstr "nie uda³o siê odczytaæ atrybutów %s"
2678 @@ -683,7 +774,7 @@
2679  msgid "mode of %s retained as %04lo (%s)\n"
2680  msgstr "uprawnienia do %s zachowane jako %04lo (%s)\n"
2681  
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
2684  #, c-format
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"
2690  
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
2693  #, c-format
2694  msgid "cannot open %s for reading"
2695  msgstr "nie mo¿na otworzyæ %s do czytania"
2696  
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
2699  #: src/tail.c:1170
2700  #, c-format
2701  msgid "cannot fstat %s"
2702  msgstr "nie mo¿na wykonaæ fstat na %s"
2703  
2704 -#: src/copy.c:238
2705 +#: src/copy.c:223
2706  #, c-format
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"
2709  
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
2713  #, c-format
2714  msgid "cannot remove %s"
2715  msgstr "nie mo¿na usun±æ %s"
2716  
2717 -#: src/copy.c:273
2718 +#: src/copy.c:258
2719  #, c-format
2720  msgid "cannot create regular file %s"
2721  msgstr "nie mo¿na utworzyæ zwyk³ego pliku %s"
2722  
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
2725  #, c-format
2726  msgid "reading %s"
2727  msgstr "czytanie %s"
2728  
2729 -#: src/copy.c:363 src/head.c:437
2730 +#: src/copy.c:348 src/head.c:437
2731  #, c-format
2732  msgid "cannot lseek %s"
2733  msgstr "nie mo¿na wykonaæ lseek na %s"
2734  
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
2737  #, c-format
2738  msgid "writing %s"
2739  msgstr "zapis %s"
2740  
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
2743  #, c-format
2744  msgid "closing %s"
2745  msgstr "zamykanie %s"
2746  
2747 -#: src/copy.c:635
2748 +#: src/copy.c:620
2749  #, c-format
2750  msgid "%s: overwrite %s, overriding mode %04lo? "
2751  msgstr "%s: zamazanie %s, obej¶æ uprawnienia %04lo? "
2752  
2753 -#: src/copy.c:641
2754 +#: src/copy.c:626
2755  #, c-format
2756  msgid "%s: overwrite %s? "
2757  msgstr "%s: zamazaæ %s? "
2758  
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
2761 +#: src/stat.c:695
2762  #, c-format
2763  msgid "cannot stat %s"
2764  msgstr "nie mo¿na wykonaæ stat na %s"
2765  
2766 -#: src/copy.c:846
2767 +#: src/copy.c:829
2768  #, c-format
2769  msgid "omitting directory %s"
2770  msgstr "katalog %s zosta³ pominiêty"
2771  
2772 -#: src/copy.c:860
2773 +#: src/copy.c:843
2774  #, c-format
2775  msgid "warning: source file %s specified more than once"
2776  msgstr "uwaga: plik ¼ród³owy %s pojawi³ siê wiêcej ni¿ raz"
2777  
2778 -#: src/copy.c:905 src/ln.c:241
2779 +#: src/copy.c:888 src/ln.c:241
2780  #, c-format
2781  msgid "%s and %s are the same file"
2782  msgstr "%s i %s to ten sam plik"
2783  
2784 -#: src/copy.c:915
2785 +#: src/copy.c:898
2786  #, c-format
2787  msgid "cannot overwrite non-directory %s with directory %s"
2788  msgstr "nie mo¿na zamazaæ nie-katalogu %s katalogiem %s"
2789  
2790 -#: src/copy.c:932
2791 +#: src/copy.c:915
2792  #, c-format
2793  msgid "will not overwrite just-created %s with %s"
2794  msgstr "nie mo¿na zamazaæ w³a¶nie utworzonego %s plikiem %s"
2795  
2796 -#: src/copy.c:943
2797 +#: src/copy.c:926
2798  #, c-format
2799  msgid "cannot overwrite directory %s with non-directory"
2800  msgstr "nie mo¿na zamazaæ katalogu %s nie-katalogiem"
2801  
2802 -#: src/copy.c:1004
2803 +#: src/copy.c:987
2804  #, c-format
2805  msgid "cannot overwrite directory %s"
2806  msgstr "nie mo¿na zamazaæ katalogu %s"
2807  
2808 -#: src/copy.c:1013
2809 +#: src/copy.c:996
2810  #, c-format
2811  msgid "cannot move directory onto non-directory: %s -> %s"
2812  msgstr "nie mo¿na przenie¶æ katalogu do nie-katalogu: %s -> %s"
2813  
2814 -#: src/copy.c:1036
2815 +#: src/copy.c:1019
2816  #, c-format
2817  msgid "backing up %s would destroy source;  %s not moved"
2818  msgstr ""
2819  "utworzenie kopii zapasowej %s zniszczy³oby ¿ród³o;  %s nie zosta³ "
2820  "przeniesiony"
2821  
2822 -#: src/copy.c:1037
2823 +#: src/copy.c:1020
2824  #, c-format
2825  msgid "backing up %s would destroy source;  %s not copied"
2826  msgstr ""
2827  "utworzenie kopii zapasowej %s zniszczy³oby ¿ród³o;  %s nie zosta³ skopiowany"
2828  
2829 -#: src/copy.c:1055 src/ln.c:279
2830 +#: src/copy.c:1038 src/ln.c:279
2831  #, c-format
2832  msgid "cannot backup %s"
2833  msgstr "nie mo¿na utworzyæ kopii zapasowej %s"
2834  
2835 -#: src/copy.c:1091 src/ln.c:314
2836 +#: src/copy.c:1074 src/ln.c:314
2837  #, c-format
2838  msgid " (backup: %s)"
2839  msgstr " (kopia zapasowa: %s)"
2840  
2841 -#: src/copy.c:1154
2842 +#: src/copy.c:1137
2843  #, c-format
2844  msgid "cannot copy a directory, %s, into itself, %s"
2845  msgstr "nie mo¿na skopiowaæ katalogu %s do siebie samego %s"
2846  
2847 -#: src/copy.c:1161
2848 +#: src/copy.c:1144
2849  #, c-format
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"
2852  
2853 -#: src/copy.c:1187
2854 +#: src/copy.c:1170
2855  #, c-format
2856  msgid "cannot create hard link %s to %s"
2857  msgstr "nie mo¿na utworzyæ dowi±zania zwyk³ego %s do %s"
2858  
2859 -#: src/copy.c:1241
2860 +#: src/copy.c:1224
2861  #, c-format
2862  msgid "cannot move %s to a subdirectory of itself, %s"
2863  msgstr "nie mo¿na przenie¶æ %s do w³asnego podkatalogu %s"
2864  
2865 -#: src/copy.c:1284
2866 +#: src/copy.c:1267
2867  #, c-format
2868  msgid "cannot move %s to %s"
2869  msgstr "nie mo¿na przenie¶æ %s do %s"
2870  
2871 -#: src/copy.c:1296
2872 +#: src/copy.c:1279
2873  #, c-format
2874  msgid "inter-device move failed: %s to %s; unable to remove target"
2875  msgstr ""
2876  "nie uda³o siê przeniesienie miêdzy urz±dzeniami: %s do %s; nie uda³o siê "
2877  "usunaæ pliku docelowego"
2878  
2879 -#: src/copy.c:1324
2880 +#: src/copy.c:1305
2881 +#, c-format
2882 +msgid "cannot set setfscreatecon %s"
2883 +msgstr "nie mo¿na ustawiæ setfscreatecon %s"
2884 +
2885 +#: src/copy.c:1315
2886 +#, c-format
2887 +msgid "warning: security context not preserved %s"
2888 +msgstr "uwaga: nie zachowano kontekstu bezpieczeñstwa %s"
2889 +
2890 +#: src/copy.c:1317
2891 +#, c-format
2892 +msgid "cannot lgetfilecon %s"
2893 +msgstr "nie mo¿na wykonaæ lgetfilecon %s"
2894 +
2895 +#: src/copy.c:1335
2896  #, c-format
2897  msgid "cannot copy cyclic symbolic link %s"
2898  msgstr "nie mo¿na skopiowaæ cyklicznego dowi±zania symbolicznego %s"
2899  
2900 -#: src/copy.c:1401
2901 +#: src/copy.c:1375 src/cp.c:496
2902 +#, c-format
2903 +msgid "setting permissions for %s"
2904 +msgstr "nie mo¿na ustawiæ uprawnieñ do %s"
2905 +
2906 +#: src/copy.c:1439
2907  #, c-format
2908  msgid "%s: can make relative symbolic links only in current directory"
2909  msgstr ""
2910  "%s: mo¿na zrobiæ tylko wzglêdne dowi±zanie symboliczne w bie¿±cym katalogu"
2911  
2912 -#: src/copy.c:1408
2913 +#: src/copy.c:1446
2914  #, c-format
2915  msgid "cannot create symbolic link %s to %s"
2916  msgstr "nie mo¿na utworzyæ dowi±zania symbolicznego %s do %s"
2917  
2918 -#: src/copy.c:1419
2919 +#: src/copy.c:1457
2920  #, c-format
2921  msgid "cannot create link %s"
2922  msgstr "nie mo¿na utworzyæ dowi±zania %s"
2923  
2924 -#: src/copy.c:1441 src/mkfifo.c:134
2925 +#: src/copy.c:1478 src/mkfifo.c:162
2926  #, c-format
2927  msgid "cannot create fifo %s"
2928  msgstr "nie mo¿na utworzyæ potoku %s"
2929  
2930 -#: src/copy.c:1452
2931 +#: src/copy.c:1489
2932  #, c-format
2933  msgid "cannot create special file %s"
2934  msgstr "nie mo¿na utworzyæ pliku specjalnego %s"
2935  
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
2938  #, c-format
2939  msgid "cannot read symbolic link %s"
2940  msgstr "nie mo¿na przeczytaæ dowi±zania symbolicznego %s"
2941  
2942 -#: src/copy.c:1489
2943 +#: src/copy.c:1526
2944  #, c-format
2945  msgid "cannot create symbolic link %s"
2946  msgstr "nie mo¿na utworzyæ dowi±zania symbolicznego %s"
2947  
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
2950  #, c-format
2951  msgid "failed to preserve ownership for %s"
2952  msgstr "nie uda³o siê zachowaæ w³asno¶ci %s"
2953  
2954 -#: src/copy.c:1520
2955 +#: src/copy.c:1562
2956  #, c-format
2957  msgid "%s has unknown file type"
2958  msgstr "%s to nieznany typ pliku"
2959  
2960 -#: src/copy.c:1553
2961 +#: src/copy.c:1595
2962  #, c-format
2963  msgid "preserving times for %s"
2964  msgstr "zachowanie czasu %s"
2965  
2966 -#: src/copy.c:1578
2967 +#: src/copy.c:1638
2968  #, c-format
2969  msgid "failed to lookup file %s"
2970  msgstr "nie uda³o siê znale¼æ pliku %s"
2971  
2972 -#: src/copy.c:1583
2973 +#: src/copy.c:1643
2974  #, c-format
2975  msgid "failed to preserve authorship for %s"
2976  msgstr "nie uda³o siê zachowaæ autorstwa %s"
2977  
2978 -#: src/copy.c:1602
2979 -#, c-format
2980 -msgid "setting permissions for %s"
2981 -msgstr "nie mo¿na ustawiæ uprawnieñ do %s"
2982 -
2983 -#: src/copy.c:1568
2984 +#: src/copy.c:1664
2985  #, c-format
2986  msgid "preserving permissions for %s"
2987  msgstr "nie mo¿na zachowaæ uprawnieñ do %s"
2988  
2989 -#: src/copy.c:1624 src/ln.c:332
2990 +#: src/copy.c:1692 src/ln.c:332
2991  #, c-format
2992  msgid "cannot un-backup %s"
2993  msgstr "nie mo¿na przywróciæ kopii zapasowej %s"
2994  
2995 -#: src/copy.c:1628
2996 +#: src/copy.c:1696
2997  #, c-format
2998  msgid "%s -> %s (unbackup)\n"
2999  msgstr "%s -> %s (przywrócenie kopii zapasowej)\n"
3000  
3001 -#: src/cp.c:158 src/mv.c:305
3002 +#: src/cp.c:167 src/mv.c:307
3003  #, c-format
3004  msgid ""
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"
3009  
3010 -#: src/cp.c:164
3011 +#: src/cp.c:173
3012  msgid ""
3013  "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
3014  "\n"
3015 @@ -1253,10 +1360,10 @@
3016  "Skopiowanie ¬RÓD£A do CELU lub ¬RÓD£A/¬RÓDE£ do KATALOGU.\n"
3017  "\n"
3018  
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
3028  #: src/uniq.c:143
3029 @@ -1265,7 +1372,7 @@
3030  msgstr ""
3031  "Argumenty obowi±zkowe dla opcji d³ugich obowi±zuj± równie¿ dla krótkich.\n"
3032  
3033 -#: src/cp.c:171
3034 +#: src/cp.c:180
3035  msgid ""
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"
3041  
3042 -#: src/cp.c:178
3043 +#: src/cp.c:187
3044  msgid ""
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"
3050  
3051 -#: src/cp.c:185
3052 +#: src/cp.c:194
3053  msgid ""
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 "
3058  "(wszystkie))\n"
3059  
3060 -#: src/cp.c:193
3061 +#: src/cp.c:202
3062 +msgid "  -c                           same as --preserve=context\n"
3063 +msgstr "  -c                           to samo co --preserve=context\n"
3064 +
3065 +#: src/cp.c:205
3066  msgid ""
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"
3072  
3073 -#: src/cp.c:198
3074 +#: src/cp.c:210
3075  msgid ""
3076  "  -R, -r, --recursive          copy directories recursively\n"
3077  "      --remove-destination     remove each existing destination file before\n"
3078 @@ -1343,7 +1454,7 @@
3079  "docelowego\n"
3080  "                                 przed prób± jego otwarcia (por. z --force)\n"
3081  
3082 -#: src/cp.c:203
3083 +#: src/cp.c:215
3084  msgid ""
3085  "      --reply={yes,no,query}   specify how to handle the prompt about an\n"
3086  "                                 existing destination file\n"
3087 @@ -1358,7 +1469,7 @@
3088  "z\n"
3089  "                                 nazw argumentów ¬RÓD£OWYCH\n"
3090  
3091 -#: src/cp.c:210
3092 +#: src/cp.c:222
3093  msgid ""
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 "
3098  "KATALOGU\n"
3099  
3100 -#: src/cp.c:215
3101 +#: src/cp.c:227
3102  msgid ""
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"
3109  msgstr ""
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"
3114 -"\n"
3115 +"  -Z, --context=KONTEKST       ustawienie KONTEKSTU bezpieczeñstwa kopii\n"
3116  
3117 -#: src/cp.c:224
3118 +#: src/cp.c:237
3119  msgid ""
3120  "\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"
3124  "\n"
3125  
3126 -#: src/cp.c:233
3127 +#: src/cp.c:246
3128  msgid ""
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"
3133  "\n"
3134  
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
3137  msgid ""
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"
3143  
3144 -#: src/cp.c:245
3145 +#: src/cp.c:258
3146  msgid ""
3147  "\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"
3151  "zwyk³ego\n"
3152  
3153 -#: src/cp.c:316
3154 +#: src/cp.c:329
3155  #, c-format
3156  msgid "failed to preserve times for %s"
3157  msgstr "nie uda³o siê zachowaæ czasu %s"
3158  
3159 -#: src/cp.c:340
3160 +#: src/cp.c:358
3161  #, c-format
3162  msgid "failed to preserve permissions for %s"
3163  msgstr "nie uda³o siê zachowaæ uprawnieñ do %s"
3164  
3165 -#: src/cp.c:423
3166 +#: src/cp.c:453
3167  #, c-format
3168  msgid "cannot make directory %s"
3169  msgstr "nie mo¿na utworzyæ katalogu %s"
3170  
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"
3175  
3176 -#: src/cp.c:487
3177 +#: src/cp.c:557
3178  msgid "missing destination file"
3179  msgstr "brakuj±cy plik docelowy"
3180  
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
3183  #, c-format
3184  msgid "accessing %s"
3185  msgstr "dostêp do %s"
3186  
3187 -#: src/cp.c:537
3188 +#: src/cp.c:607
3189  #, c-format
3190  msgid "%s: specified destination directory does not exist"
3191  msgstr "%s: podany katalog docelowy nie istnieje"
3192  
3193 -#: src/cp.c:539
3194 +#: src/cp.c:609
3195  #, c-format
3196  msgid "%s: specified target is not a directory"
3197  msgstr "%s: podany CEL nie jest katalogiem"
3198  
3199 -#: src/cp.c:542
3200 +#: src/cp.c:612
3201  #, c-format
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"
3204  
3205 -#: src/cp.c:645
3206 +#: src/cp.c:709
3207  msgid "when preserving paths, the destination must be a directory"
3208  msgstr "je¿eli s± zachowane ¶cie¿ki, ostatni argument musi byæ katalogiem"
3209  
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
3212  #, c-format
3213  msgid ""
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 ."
3218  
3219 -#: src/cp.c:966 src/ln.c:473
3220 +#: src/cp.c:1017
3221 +#, c-format
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"
3224 +
3225 +#: src/cp.c:1027
3226 +#, c-format
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"
3229 +
3230 +#: src/cp.c:1031 src/install.c:369
3231 +#, c-format
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"
3234 +
3235 +#: src/cp.c:1038
3236 +#, c-format
3237 +msgid "cannot set default security context %s"
3238 +msgstr "nie mo¿na ustawiæ domy¶lnego kontekstu bezpieczeñstwa %s"
3239 +
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"
3243  
3244 -#: src/cp.c:1002
3245 +#: src/cp.c:1107
3246  msgid "cannot make both hard and symbolic links"
3247  msgstr "nie mo¿na zrobiæ dowi±zania symbolicznego i zwyk³ego równocze¶nie"
3248  
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
3251  msgid "backup type"
3252  msgstr "rodzaj kopii zapasowej"
3253  
3254 @@ -1707,7 +1839,7 @@
3255  "PRZESUNIÊCIE linii musi siê sk³adaæ z `+' albo `-' oraz liczby ca³kowitej.\n"
3256  
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
3262  #, c-format
3263 @@ -2083,7 +2215,7 @@
3264  msgid "time %s is out of range"
3265  msgstr "czas %s jest spoza zakresu"
3266  
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
3269  #, c-format
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"
3275  
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
3278  msgid ""
3279  "\n"
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"
3284  
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
3287  msgid "total"
3288  msgstr "razem"
3289  
3290 @@ -3036,7 +3168,7 @@
3291  msgid "invalid number of columns: `%s'"
3292  msgstr "b³êdna liczba kolumn: `%s'"
3293  
3294 -#: src/getgid.c:37
3295 +#: src/getgid.c:41
3296  #, c-format
3297  msgid ""
3298  "Usage:\n"
3299 @@ -3206,16 +3338,17 @@
3300  msgid "cannot determine hostname"
3301  msgstr "uzyskanie nazwy systemu jest niemo¿liwe"
3302  
3303 -#: src/id.c:86
3304 +#: src/id.c:106
3305  #, c-format
3306  msgid "Usage: %s [OPTION]... [USERNAME]\n"
3307  msgstr "Sk³adnia: %s [OPCJA]... [U¯YTKOWNIK]\n"
3308  
3309 -#: src/id.c:87
3310 +#: src/id.c:107
3311  msgid ""
3312  "Print information for USERNAME, or the current user.\n"
3313  "\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 @@
3320  msgstr ""
3321  "Wy¶wietla informacjê o U¯YTKOWNIKU lub o aktualnym u¿ytkowniku.\n"
3322  "\n"
3323 -"  -a              ignorowane, dla zachowania kompatybilno¶ci z innymi "
3324 -"wersjami\n"
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 @@
3331  "ugG\n"
3332  "  -u, --user      wy¶wietlenie tylko efektywnego identyfikatora u¿ytkownika\n"
3333  
3334 -#: src/id.c:99
3335 +#: src/id.c:120
3336  msgid ""
3337  "\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"
3341  "zidentyfikowaæ.\n"
3342  
3343 -#: src/id.c:162
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
3347 +#, c-format
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"
3350 +
3351 +#: src/id.c:198
3352 +msgid ""
3353 +"cannot display context when SELinux not enabled or when displaying the id\n"
3354 +"of a different user"
3355 +msgstr ""
3356 +"nie mo¿na wy¶wietliæ kontekstu kiedy SELinux nie jest w³±czony lub przy\n"
3357 +"wy¶wietlaniu identyfikatora innego u¿ytkownika"
3358 +
3359 +#: src/id.c:209
3360 +msgid "can't get process context"
3361 +msgstr "nie mo¿na uzyskaæ kontekstu procesu"
3362 +
3363 +#: src/id.c:214
3364 +msgid "cannot print \"only\" of more than one choice"
3365 +msgstr "nie mo¿na wypisaæ \"tylko czego¶\" dla wiêcej ni¿ jednej rzeczy"
3366  
3367 -#: src/id.c:166
3368 +#: src/id.c:218
3369  msgid "cannot print only names or real IDs in default format"
3370  msgstr ""
3371  "nie da siê wypisaæ tylko nazw lub rzeczywistych ID w domy¶lnym formacie"
3372  
3373 -#: src/id.c:175
3374 +#: src/id.c:227
3375  #, c-format
3376  msgid "%s: No such user"
3377  msgstr "%s: Nie ma takiego u¿ytkownika"
3378  
3379 -#: src/id.c:212
3380 +#: src/id.c:268
3381  #, c-format
3382  msgid "cannot find name for user ID %u"
3383  msgstr "nie mo¿na znale¼æ nazwy u¿ytkownika o ID %u"
3384  
3385 -#: src/id.c:235
3386 +#: src/id.c:291
3387  #, c-format
3388  msgid "cannot find name for group ID %u"
3389  msgstr "nie mo¿na znale¼æ nazwy grupy o ID %u"
3390  
3391 -#: src/id.c:273
3392 +#: src/id.c:329
3393  msgid "cannot get supplemental group list"
3394  msgstr "uzyskanie pe³nej listy grup niemo¿liwe"
3395  
3396 -#: src/id.c:385
3397 +#: src/id.c:441
3398  msgid " groups="
3399  msgstr " grupy="
3400  
3401 -#: src/install.c:266
3402 +#: src/id.c:458
3403 +#, c-format
3404 +msgid " context=%s"
3405 +msgstr " kontekst=%s"
3406 +
3407 +#: src/install.c:365
3408 +#, c-format
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"
3411 +
3412 +#: src/install.c:377
3413 +#, c-format
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"
3416 +
3417 +#: src/install.c:382
3418 +#, c-format
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"
3421 +
3422 +#: src/install.c:387
3423 +#, c-format
3424 +msgid "%s: cannot setup default context == '%s'\n"
3425 +msgstr "%s: nie mo¿na ustawiæ domy¶lnego kontekstu '%s'\n"
3426 +
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"
3430  
3431 -#: src/install.c:289 src/mkdir.c:141
3432 +#: src/install.c:425 src/mkdir.c:170
3433  #, c-format
3434  msgid "invalid mode %s"
3435  msgstr "b³êdne uprawnienia %s"
3436  
3437 -#: src/install.c:304 src/install.c:368
3438 +#: src/install.c:440 src/install.c:504
3439  #, c-format
3440  msgid "creating directory %s"
3441  msgstr "tworzenie katalogu %s"
3442  
3443 -#: src/install.c:329
3444 +#: src/install.c:465
3445  #, c-format
3446  msgid "installing multiple files, but last argument, %s is not a directory"
3447  msgstr ""
3448  "próba instalowania wielu plików gdy ostatni argument %s nie jest katalogiem"
3449  
3450 -#: src/install.c:432
3451 +#: src/install.c:568
3452  #, c-format
3453  msgid "%s is a directory"
3454  msgstr "%s jest katalogiem"
3455  
3456 -#: src/install.c:468
3457 +#: src/install.c:610
3458  #, c-format
3459  msgid "cannot change ownership of %s"
3460  msgstr "nie mo¿na zmieniæ w³a¶ciciela na %s"
3461  
3462 -#: src/install.c:492
3463 +#: src/install.c:634
3464  #, c-format
3465  msgid "cannot obtain time stamps for %s"
3466  msgstr "nie mo¿na odczytaæ czasów %s"
3467  
3468 -#: src/install.c:502
3469 +#: src/install.c:644
3470  #, c-format
3471  msgid "cannot set time stamps for %s"
3472  msgstr "nie mo¿na ustawiæ czasów %s"
3473  
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"
3478  
3479 -#: src/install.c:527
3480 +#: src/install.c:669
3481  msgid "cannot run strip"
3482  msgstr "nie uda³o siê uruchomiæ strip"
3483  
3484 -#: src/install.c:534
3485 +#: src/install.c:676
3486  msgid "strip failed"
3487  msgstr "b³±d strip"
3488  
3489 -#: src/install.c:555
3490 +#: src/install.c:697
3491  #, c-format
3492  msgid "invalid user %s"
3493  msgstr "b³êdny u¿ytkownik %s"
3494  
3495 -#: src/install.c:573
3496 +#: src/install.c:715
3497  #, c-format
3498  msgid "invalid group %s"
3499  msgstr "b³êdna grupa %s"
3500  
3501 -#: src/install.c:592
3502 +#: src/install.c:734
3503  #, c-format
3504  msgid ""
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"
3509  
3510 -#: src/install.c:598
3511 +#: src/install.c:740
3512  msgid ""
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"
3517  "\n"
3518  
3519 -#: src/install.c:607
3520 +#: src/install.c:749
3521  msgid ""
3522  "      --backup[=CONTROL] make a backup of each existing destination file\n"
3523  "  -b                  like --backup but does not accept an argument\n"
3524  "  -c                  (ignored)\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 "
3527 +"the\n"
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¿ "
3538 +"istnieje\n"
3539 +"                        i jest taki sam - wtedy mtime pozostanie nie "
3540 +"zmieniony\n"
3541  "                        (dla kompatybilno¶ci z *BSD)\n"
3542  "  -d, --directory     traktowanie wszystkich argumentów jako nazw "
3543  "katalogów;\n"
3544  "                        tworzenie katalogów sk³adowych podanych katalogów\n"
3545  
3546 -#: src/install.c:614
3547 +#: src/install.c:759
3548  msgid ""
3549  "  -D                  create all leading components of DEST except the "
3550  "last,\n"
3551 @@ -3401,7 +3579,7 @@
3552  "xr-x\n"
3553  "  -o, --owner=W£A¦CICIEL   ustawienie W£A¦CICIELA (tylko super-user)\n"
3554  
3555 -#: src/install.c:621
3556 +#: src/install.c:766
3557  msgid ""
3558  "  -p, --preserve-timestamps   apply access/modification times of SOURCE "
3559  "files\n"
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"
3563  
3564 -#: src/install.c:630 src/ln.c:385 src/mv.c:342
3565 +#: src/install.c:773
3566 +msgid ""
3567 +"  -P, --preserve_context (SELinux) Preserve security context\n"
3568 +"  -Z, --context=CONTEXT  (SELinux) Set security context of files and directories\n"
3569 +msgstr ""
3570 +"  -P, --preserve_context (SELinux) zachowanie kontekstu bezpieczeñstwa\n"
3571 +"  -Z, --context=KONTEKST (SELinux) ustawienie kontekstu plików i katalogów\n"
3572 +
3573 +#: src/install.c:780 src/ln.c:385 src/mv.c:344
3574  msgid ""
3575  "\n"
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"
3580  
3581 -#: src/ls.c:648
3582 +#: src/ls.c:129
3583 +#, c-format
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"
3586 +
3587 +#: src/ls.c:669
3588  msgid "%b %e  %Y"
3589  msgstr "%b %e  %Y"
3590  
3591 -#: src/ls.c:656
3592 +#: src/ls.c:677
3593  msgid "%b %e %H:%M"
3594  msgstr "%b %e %H:%M"
3595  
3596 -#: src/ls.c:1283
3597 +#: src/ls.c:1332
3598  #, c-format
3599  msgid "ignoring invalid value of environment variable QUOTING_STYLE: %s"
3600  msgstr "ignorujê b³êdny rozmiar zmiennej ¶rodowiskowej QUOTING_STYLE: %s"
3601  
3602 -#: src/ls.c:1310
3603 +#: src/ls.c:1359
3604  #, c-format
3605  msgid "ignoring invalid width in environment variable COLUMNS: %s"
3606  msgstr "ignorujê b³êdn± d³ugo¶æ w zmiennej ¶rodowiskowej COLUMNS: %s"
3607  
3608 -#: src/ls.c:1342
3609 +#: src/ls.c:1391
3610  #, c-format
3611  msgid "ignoring invalid tab size in environment variable TABSIZE: %s"
3612  msgstr "ignorujê b³êdny rozmiar tab-a w zmiennej ¶rodowiska TABSIZE: %s"
3613  
3614 -#: src/ls.c:1459
3615 +#: src/ls.c:1508
3616  #, c-format
3617  msgid "invalid line width: %s"
3618  msgstr "b³êdna szeroko¶æ linii: %s"
3619  
3620 -#: src/ls.c:1533
3621 +#: src/ls.c:1589
3622  #, c-format
3623  msgid "invalid tab size: %s"
3624  msgstr "b³êdny rozmiar TAB-a: %s"
3625  
3626 -#: src/ls.c:1701
3627 +#: src/ls.c:1776
3628  #, c-format
3629  msgid "invalid time style format %s"
3630  msgstr "b³êdny format stylu czasu %s"
3631  
3632 -#: src/ls.c:2037
3633 +#: src/ls.c:2112
3634  #, c-format
3635  msgid "unrecognized prefix: %s"
3636  msgstr "nierozpoznany prefiks: %s"
3637  
3638 -#: src/ls.c:2060
3639 +#: src/ls.c:2135
3640  msgid "unparsable value for LS_COLORS environment variable"
3641  msgstr "niezrozumia³a warto¶æ zmiennej ¶rodowiska LS_COLORS"
3642  
3643 -#: src/ls.c:2128
3644 +#: src/ls.c:2203
3645  #, c-format
3646  msgid "cannot determine device and inode of %s"
3647  msgstr "nie mo¿na ustaliæ urz±dzenia i i-wêz³a %s"
3648  
3649 -#: src/ls.c:2138
3650 +#: src/ls.c:2213
3651  #, c-format
3652  msgid "not listing already-listed directory: %s"
3653  msgstr "nie bêdzie wylistowany katalog %s ju¿ wylistowany poprzednio"
3654  
3655 -#: src/ls.c:2191 src/remove.c:938
3656 +#: src/ls.c:2266 src/remove.c:938
3657  #, c-format
3658  msgid "reading directory %s"
3659  msgstr "czytanie katalogu %s"
3660  
3661 -#: src/ls.c:2671
3662 +#: src/ls.c:2765
3663  #, c-format
3664  msgid "cannot compare file names %s and %s"
3665  msgstr "nie mo¿na porównaæ nazw plików %s i %s"
3666  
3667 -#: src/ls.c:3013
3668 +#: src/ls.c:3117
3669  msgid "User name too long"
3670  msgstr "Za d³uga nazwa u¿ytkownika"
3671  
3672 -#: src/ls.c:3034
3673 +#: src/ls.c:3138
3674  msgid "Group name too long"
3675  msgstr "Za d³uga nazwa grupy"
3676  
3677 -#: src/ls.c:3906
3678 +#: src/ls.c:4018
3679  msgid ""
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"
3684  "\n"
3685  
3686 -#: src/ls.c:3914
3687 +#: src/ls.c:4026
3688  msgid ""
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"
3694  
3695 -#: src/ls.c:3920
3696 +#: src/ls.c:4032
3697  msgid ""
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"
3703  
3704 -#: src/ls.c:3928
3705 +#: src/ls.c:4040
3706  msgid ""
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"
3712  
3713 -#: src/ls.c:3936
3714 +#: src/ls.c:4048
3715  msgid ""
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 @@
3719  "                               kolumnach) -C\n"
3720  "      --full-time            jak -l --time-style=full-iso\n"
3721  
3722 -#: src/ls.c:3943
3723 +#: src/ls.c:4055
3724  msgid ""
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"
3730  
3731 -#: src/ls.c:3954
3732 +#: src/ls.c:4066
3733  msgid ""
3734  "      --indicator-style=WORD append indicator with style WORD to entry "
3735  "names:\n"
3736 @@ -4002,7 +4193,7 @@
3737  "WZORU\n"
3738  "  -k                         jak --block-size=1K\n"
3739  
3740 -#: src/ls.c:3961
3741 +#: src/ls.c:4073
3742  msgid ""
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 "
3747  "przecinkami\n"
3748  
3749 -#: src/ls.c:3968
3750 +#: src/ls.c:4080
3751  msgid ""
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 /"
3756  "=@|)\n"
3757  
3758 -#: src/ls.c:3975
3759 +#: src/ls.c:4087
3760  msgid ""
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, "
3765  "escape\n"
3766  
3767 -#: src/ls.c:3983
3768 +#: src/ls.c:4095
3769  msgid ""
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 "
3774  "plik\n"
3775  
3776 -#: src/ls.c:3988
3777 +#: src/ls.c:4100
3778  msgid ""
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"
3784  
3785 -#: src/ls.c:3997
3786 +#: src/ls.c:4109
3787  msgid ""
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"
3793  
3794 -#: src/ls.c:4008
3795 +#: src/ls.c:4120
3796  msgid ""
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 @@
3800  "katalogu\n"
3801  "  -v                         sortowanie wg wersji\n"
3802  
3803 -#: src/ls.c:4015
3804 +#: src/ls.c:4127
3805  msgid ""
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"
3811  
3812 -#: src/ls.c:4027
3813 +#: src/ls.c:4134
3814 +#, c-format
3815 +msgid ""
3816 +"\n"
3817 +"SELinux options:\n"
3818 +"\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"
3825 +"\n"
3826 +"\n"
3827 +msgstr ""
3828 +"\n"
3829 +"Opcje dla SELinuksa:\n"
3830 +"\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"
3838 +"\n"
3839 +"\n"
3840 +
3841 +#: src/ls.c:4149
3842  msgid ""
3843  "\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"
3848  
3849 -#: src/mkdir.c:61
3850 +#: src/mkdir.c:68
3851  #, c-format
3852  msgid "Usage: %s [OPTION] DIRECTORY...\n"
3853  msgstr "Sk³adnia: %s [OPCJA] KATALOG...\n"
3854  
3855 -#: src/mkdir.c:62
3856 +#: src/mkdir.c:69
3857  msgid ""
3858  "Create the DIRECTORY(ies), if they do not already exist.\n"
3859  "\n"
3860 @@ -4331,7 +4550,12 @@
3861  "Utworzenie KATALOGU/ÓW, je¿eli jeszcze nie istniej±.\n"
3862  "\n"
3863  
3864 -#: src/mkdir.c:69
3865 +#: src/mkdir.c:74
3866 +#, c-format
3867 +msgid "  -Z, --context=CONTEXT (SELinux) set security context to CONTEXT\n"
3868 +msgstr "  -Z, --context=KONTEKST (SELinux) ustawienie KONTEKSTU bezpieczeñstwa\n"
3869 +
3870 +#: src/mkdir.c:81
3871  msgid ""
3872  "  -m, --mode=MODE   set permission mode (as in chmod), not rwxrwxrwx - "
3873  "umask\n"
3874 @@ -4343,22 +4567,27 @@
3875  "katalogów\n"
3876  "  -v, --verbose     wypisanie komunikatu o ka¿dym utworzonym katalogu\n"
3877  
3878 -#: src/mkdir.c:114
3879 +#: src/mkdir.c:130
3880  #, c-format
3881  msgid "created directory %s"
3882  msgstr "utworzony katalog %s"
3883  
3884 -#: src/mkdir.c:191
3885 +#: src/mkdir.c:170 src/mkfifo.c:128 src/mknod.c:139
3886 +#, c-format
3887 +msgid "Sorry, cannot set default context to %s.\n"
3888 +msgstr "Niestety nie mo¿na ustawiæ domy¶lnego kontekstu na %s.\n"
3889 +
3890 +#: src/mkdir.c:220
3891  #, c-format
3892  msgid "cannot set permissions of directory %s"
3893  msgstr "nie mo¿na ustawiæ uprawnieñ katalogu %s"
3894  
3895 -#: src/mkfifo.c:55
3896 +#: src/mkfifo.c:62
3897  #, c-format
3898  msgid "Usage: %s [OPTION] NAME...\n"
3899  msgstr "Sk³adnia: %s [OPCJA] NAZWA...\n"
3900  
3901 -#: src/mkfifo.c:56
3902 +#: src/mkfifo.c:63
3903  msgid ""
3904  "Create named pipes (FIFOs) with the given NAMEs.\n"
3905  "\n"
3906 @@ -4366,31 +4595,36 @@
3907  "Tworzenie nazwanych potoków (pipes, FIFOs) o podanych NAZWACH.\n"
3908  "\n"
3909  
3910 -#: src/mkfifo.c:63 src/mknod.c:64
3911 +#: src/mkfifo.c:68 src/mknod.c:69
3912 +#, c-format
3913 +msgid "  -Z, --context=CONTEXT   set security context (quoted string)\n"
3914 +msgstr "  -Z, --context=KONTEKST  ustawienie kontekstu bezpieczeñstwa (³añcuch cytowany)\n"
3915 +
3916 +#: src/mkfifo.c:75 src/mknod.c:76
3917  msgid ""
3918  "  -m, --mode=MODE   set permission mode (as in chmod), not a=rw - umask\n"
3919  msgstr ""
3920  "  -m, --mode=UPRAWN ustawienie uprawnieñ (jak w chmod), nie a=rw-umask\n"
3921  
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"
3926  
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"
3931  
3932 -#: src/mkfifo.c:143
3933 +#: src/mkfifo.c:171
3934  #, c-format
3935  msgid "cannot set permissions of fifo %s"
3936  msgstr "nie mo¿na ustawiæ uprawnieñ potoku %s"
3937  
3938 -#: src/mknod.c:55
3939 +#: src/mknod.c:62
3940  #, c-format
3941  msgid "Usage: %s [OPTION]... NAME TYPE [MAJOR MINOR]\n"
3942  msgstr "Sk³adnia: %s [OPCJA]... NAZWA TYP [WIÊKSZY MNIEJSZY]\n"
3943  
3944 -#: src/mknod.c:57
3945 +#: src/mknod.c:64
3946  msgid ""
3947  "Create the special file NAME of the given TYPE.\n"
3948  "\n"
3949 @@ -4398,7 +4632,7 @@
3950  "Utworzenie pliku specjalnego o podanej NAZWIE i TYPIE.\n"
3951  "\n"
3952  
3953 -#: src/mknod.c:69
3954 +#: src/mknod.c:81
3955  msgid ""
3956  "\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"
3961  
3962 -#: src/mknod.c:76
3963 +#: src/mknod.c:88
3964  msgid ""
3965  "\n"
3966  "  b      create a block (buffered) special file\n"
3967 @@ -4425,19 +4659,19 @@
3968  "  c, u   specjalny plik znakowy (niebuforowany)\n"
3969  "  p      potok (FIFO)\n"
3970  
3971 -#: src/mknod.c:142
3972 +#: src/mknod.c:171
3973  msgid "wrong number of arguments"
3974  msgstr "z³a liczba argumentów"
3975  
3976 -#: src/mknod.c:154
3977 +#: src/mknod.c:183
3978  msgid "block special files not supported"
3979  msgstr "specjalne pliki blokowe nie s± obs³ugiwane"
3980  
3981 -#: src/mknod.c:163
3982 +#: src/mknod.c:192
3983  msgid "character special files not supported"
3984  msgstr "specjalne pliki znakowe nie s± obs³ugiwane"
3985  
3986 -#: src/mknod.c:172
3987 +#: src/mknod.c:201
3988  msgid ""
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"
3994  
3995 -#: src/mknod.c:187
3996 +#: src/mknod.c:216
3997  #, c-format
3998  msgid "invalid major device number %s"
3999  msgstr "b³êdny wiêkszy numer urz±dzenia %s"
4000  
4001 -#: src/mknod.c:192
4002 +#: src/mknod.c:221
4003  #, c-format
4004  msgid "invalid minor device number %s"
4005  msgstr "b³êdny mniejszy numer urz±dzenia %s"
4006  
4007 -#: src/mknod.c:197
4008 +#: src/mknod.c:226
4009  #, c-format
4010  msgid "invalid device %s %s"
4011  msgstr "b³êdne urz±dzenie %s %s"
4012  
4013 -#: src/mknod.c:211
4014 +#: src/mknod.c:240
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"
4017  
4018 -#: src/mknod.c:221
4019 +#: src/mknod.c:250
4020  #, c-format
4021  msgid "invalid device type %s"
4022  msgstr "b³êdne typ urz±dzenia %s"
4023  
4024 -#: src/mknod.c:232
4025 +#: src/mknod.c:261
4026  #, c-format
4027  msgid "cannot set permissions of %s"
4028  msgstr "nie mo¿na ustawiæ uprawnieñ do %s"
4029  
4030 -#: src/mv.c:311
4031 +#: src/mv.c:313
4032  msgid ""
4033  "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"
4034  "\n"
4035 @@ -4483,7 +4717,7 @@
4036  "do KATALOGU.\n"
4037  "\n"
4038  
4039 -#: src/mv.c:318
4040 +#: src/mv.c:320
4041  msgid ""
4042  "      --backup[=CONTROL]       make a backup of each existing destination "
4043  "file\n"
4044 @@ -4503,7 +4737,7 @@
4045  "  -i, --interactive            pytanie przed zamazaniem\n"
4046  "                                 (równowa¿ne --reply=query)\n"
4047  
4048 -#: src/mv.c:326
4049 +#: src/mv.c:328
4050  msgid ""
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 "
4055  "zapasowej\n"
4056  
4057 -#: src/mv.c:333
4058 +#: src/mv.c:335
4059  msgid ""
4060  "      --target-directory=DIRECTORY  move all SOURCE arguments into "
4061  "DIRECTORY\n"
4062 @@ -4533,12 +4767,12 @@
4063  "                                 CELU albo nie ma CELU\n"
4064  "  -v, --verbose                wyja¶nianie co siê dzieje\n"
4065  
4066 -#: src/mv.c:462
4067 +#: src/mv.c:468
4068  #, c-format
4069  msgid "specified target, %s is not a directory"
4070  msgstr "podany cel %s nie jest katalogiem"
4071  
4072 -#: src/mv.c:470
4073 +#: src/mv.c:476
4074  msgid "when moving multiple files, last argument must be a directory"
4075  msgstr ""
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"
4079  "                  katalogu\n"
4080  
4081 +#: src/runcon.c:42
4082 +#, c-format
4083 +msgid ""
4084 +"Usage: %s [OPTION]... command [args]\n"
4085 +"Run a program in a different security context.\n"
4086 +"\n"
4087 +"  context       Complete security context\n"
4088 +"  -t            type (for same role as parent)\n"
4089 +"  -u            user identity\n"
4090 +"  -r            role\n"
4091 +"  -l            levelrange\n"
4092 +"    --help      display this help and exit\n"
4093 +msgstr ""
4094 +"Sk³adnia: %s [OPCJA]... polecenie [argumenty]\n"
4095 +"Uruchomienie programu w innym kontek¶cie bezpieczeñstwa.\n"
4096 +"\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"
4100 +"  -r            rola\n"
4101 +"  -l            zakres poziomów\n"
4102 +"    --help      wy¶wietlenie tego opisu i zakoñczenie\n"
4103 +
4104 +#: src/runcon.c:90
4105 +#, c-format
4106 +msgid "multiple roles\n"
4107 +msgstr "wiele ról\n"
4108 +
4109 +#: src/runcon.c:97
4110 +#, c-format
4111 +msgid "multiple types\n"
4112 +msgstr "wiele typów\n"
4113 +
4114 +#: src/runcon.c:104
4115 +#, c-format
4116 +msgid "multiple users\n"
4117 +msgstr "wielu u¿ytkowników\n"
4118 +
4119 +#: src/runcon.c:111
4120 +#, c-format
4121 +msgid "multiple levelranges\n"
4122 +msgstr "wiele zakresów poziomów\n"
4123 +
4124 +#: src/runcon.c:117
4125 +#, c-format
4126 +msgid "unrecognised option %c\n"
4127 +msgstr "nierozpoznana opcja %c\n"
4128 +
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"
4132 +
4133 +#: src/runcon.c:131
4134 +msgid "no command found"
4135 +msgstr "nie znaleziono polecenia"
4136 +
4137 +#: src/runcon.c:137 src/runcon.c:145
4138 +#, c-format
4139 +msgid "%s is not a valid context\n"
4140 +msgstr "%s nie jest poprawnym kontekstem\n"
4141 +
4142 +#: src/runcon.c:163
4143 +#, c-format
4144 +msgid "unable to setup security context %s\n"
4145 +msgstr "nie mo¿na ustawiæ kontekstu bezpieczeñstwa %s\n"
4146 +
4147  #: src/seq.c:82
4148  #, c-format
4149  msgid ""
4150 @@ -6706,23 +7006,24 @@
4151  msgid "invalid number of lines: 0"
4152  msgstr "b³êdna liczba linii: 0"
4153  
4154 -#: src/stat.c:625
4155 +#: src/stat.c:648
4156  #, c-format
4157  msgid "cannot read file system information for %s"
4158  msgstr "nie mo¿na przeczytaæ informacji systemowych o %s"
4159  
4160 -#: src/stat.c:701
4161 +#: src/stat.c:781
4162  #, c-format
4163  msgid "Usage: %s [OPTION] FILE...\n"
4164  msgstr "Sk³adnia: %s [OPCJA] PLIK...\n"
4165  
4166 -#: src/stat.c:702
4167 +#: src/stat.c:782
4168  msgid ""
4169  "Display file or filesystem status.\n"
4170  "\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"
4176  msgstr ""
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"
4184  
4185 -#: src/stat.c:713
4186 +#: src/stat.c:794
4187  msgid ""
4188  "\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"
4193  
4194 -#: src/stat.c:721
4195 +#: src/stat.c:802
4196  msgid ""
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"
4202  
4203 -#: src/stat.c:729
4204 +#: src/stat.c:810
4205  msgid ""
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"
4211  
4212 -#: src/stat.c:739
4213 +#: src/stat.c:820
4214  msgid ""
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"
4219  "\n"
4220  
4221 -#: src/stat.c:751
4222 +#: src/stat.c:832
4223  msgid ""
4224  "Valid format sequences for file systems:\n"
4225  "\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"
4231  msgstr ""
4232  "Prawid³owe specyfikacje formatu dla systemów plików:\n"
4233  "\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"
4239  
4240 -#: src/stat.c:760
4241 +#: src/stat.c:842
4242  msgid ""
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"
4248  
4249 -#: src/stat.c:800
4250 +#: src/stat.c:883
4251  msgid "Warning: `-l' is deprecated; use `-L' instead"
4252  msgstr "Uwaga: opcja -l zostanie w przysz³o¶ci usuniêta, u¿ywaj -L"
4253  
4254 +#: src/stat.c:900
4255 +msgid "Kernel is not SELinux enabled"
4256 +msgstr "J±dro nie ma obs³ugi SELinuksa"
4257 +
4258  #: src/stty.c:489
4259  #, c-format
4260  msgid ""
This page took 0.395548 seconds and 3 git commands to generate.