summaryrefslogtreecommitdiff
path: root/src/chown-core.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-12-14 15:41:05 +0100
committerJim Meyering <jim@meyering.net>2006-12-14 15:41:50 +0100
commitc3154b2947abbb8d03a412d5874fcceb1fc29393 (patch)
tree228cca8b905de2e2542887e211fec68bb2a298ba /src/chown-core.c
parent24852bf5b5e7fd954f2e4d1d08d58575453b48b0 (diff)
downloadcoreutils-c3154b2947abbb8d03a412d5874fcceb1fc29393.tar.xz
chgrp, chown: Don't prohibit -RLh, aka -RL with --no-dereference.
* src/chgrp.c (main): Don't prohibit -RLh, aka -RL with --no-dereference. * src/chown.c (main): Likewise. * src/chown-core.c (change_file_owner): Add to a comment. * tests/chown/preserve-root: Add tests. * doc/coreutils.texi (Treating / specially): With --preserve-root, chgrp and chown will not modify "/", even through a symlink.
Diffstat (limited to 'src/chown-core.c')
-rw-r--r--src/chown-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chown-core.c b/src/chown-core.c
index 606db39ea..b39061091 100644
--- a/src/chown-core.c
+++ b/src/chown-core.c
@@ -261,7 +261,8 @@ change_file_owner (FTS *fts, FTSENT *ent,
{
if (ROOT_DEV_INO_CHECK (chopt->root_dev_ino, ent->fts_statp))
{
- /* This happens e.g., with "chown -R --preserve-root /". */
+ /* This happens e.g., with "chown -R --preserve-root 0 /"
+ and with "chown -RH --preserve-root 0 symlink-to-root". */
ROOT_DEV_INO_WARN (file_full_name);
/* Tell fts not to traverse into this hierarchy. */
fts_set (fts, ent, FTS_SKIP);