doc: chcon: add descriptions for three undocumented options
authorBenno Schulenberg <bensberg@justemail.net>
Mon, 15 Oct 2012 17:37:34 +0000 (19:37 +0200)
committerPádraig Brady <P@draigBrady.com>
Fri, 9 Nov 2012 13:16:36 +0000 (13:16 +0000)
These were missed in this related change v8.14-104-g44e20cd

* src/chcon.c (usage): Mention the two --preserve-root options.
* doc/coreutils.texi (chcon invocation): Plus the --dereferece option.

doc/coreutils.texi
src/chcon.c

index f126f49..7f8c0d1 100644 (file)
@@ -1384,7 +1384,7 @@ legitimate uses for such a command,
 that resolves to @file{/}.  If you really want to try to remove all
 the files on your system, you can use the @option{--no-preserve-root}
 option, but the default behavior, specified by the
-@option{--preserve-option}, is safer for most purposes.
+@option{--preserve-root} option, is safer for most purposes.
 
 The commands @command{chgrp}, @command{chmod} and @command{chown}
 can also operate destructively on entire hierarchies, so they too
@@ -15256,12 +15256,16 @@ The program accepts the following options.  Also see @ref{Common options}.
 
 @table @samp
 
+@item --dereference
+@opindex --dereference
+Do not affect symbolic links but what they refer to; this is the default.
+
 @item -h
 @itemx --no-dereference
 @opindex -h
 @opindex --no-dereference
 @cindex no dereference
-Affect symbolic links instead of any referenced file.
+Affect the symbolic links themselves instead of any referenced file.
 
 @item --reference=@var{rfile}
 @opindex --reference
@@ -15274,6 +15278,18 @@ Use @var{rfile}'s security context rather than specifying a @var{context} value.
 @opindex --recursive
 Operate on files and directories recursively.
 
+@item --preserve-root
+@opindex --preserve-root
+Refuse to operate recursively on the root directory, @file{/},
+when used together with the @option{--recursive} option.
+@xref{Treating / specially}.
+
+@item --no-preserve-root
+@opindex --no-preserve-root
+Do not treat the root directory, @file{/}, specially when operating
+recursively; this is the default.
+@xref{Treating / specially}.
+
 @choptH
 @xref{Traversing symlinks}.
 
index 34e92e4..66075f5 100644 (file)
@@ -371,6 +371,10 @@ With --reference, change the security context of each FILE to that of RFILE.\n\
   -l, --range=RANGE      set range RANGE in the target security context\n\
 "), stdout);
       fputs (_("\
+      --no-preserve-root  do not treat '/' specially (the default)\n\
+      --preserve-root    fail to operate recursively on '/'\n\
+"), stdout);
+      fputs (_("\
       --reference=RFILE  use RFILE's security context rather than specifying\n\
                          a CONTEXT value\n\
 "), stdout);