diff options
author | ru <ru@FreeBSD.org> | 2001-05-28 12:58:10 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-05-28 12:58:10 +0000 |
commit | 68d3eccc3a5859b2996425370174c70d54228d41 (patch) | |
tree | eeef75904b015972527c6571a7b6d5273b995bc1 /usr.sbin/chown | |
parent | f4bfdd619394d667ac10bf53f4ddb2b90b909f2f (diff) | |
download | FreeBSD-src-68d3eccc3a5859b2996425370174c70d54228d41.zip FreeBSD-src-68d3eccc3a5859b2996425370174c70d54228d41.tar.gz |
Follow symbolic links named as command line arguments if run without -R.
This is required by symlink(7), ``Commands not traversing a file tree''
subsection, third paragraph:
: It is important to realize that this rule includes commands which may
: optionally traverse file trees, e.g. the command ``chown file'' is
: included in this rule, while the command ``chown -R file'' is not.
For chown(8) and chgrp(1), this is also is compliance with the latest
POSIX 1003.1-200x draft.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/chown')
-rw-r--r-- | usr.sbin/chown/chown.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index dacf623..b86af0e 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -122,8 +122,8 @@ main(argc, argv) if (argc < 2) usage(); - fts_options = FTS_PHYSICAL; if (Rflag) { + fts_options = FTS_PHYSICAL; if (hflag && (Lflag || Hflag)) errx(1, "the -R and -h options may not be specified together"); if (Hflag) @@ -132,7 +132,8 @@ main(argc, argv) fts_options &= ~FTS_PHYSICAL; fts_options |= FTS_LOGICAL; } - } + } else + fts_options = FTS_LOGICAL; uid = gid = -1; if (ischown) { |