diff options
author | ru <ru@FreeBSD.org> | 2001-05-31 11:47:20 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-05-31 11:47:20 +0000 |
commit | 8a1fd26292643530761d412e06ddd50a6a782bd1 (patch) | |
tree | c8c96f0ca9422decea8ce9cf92e4b02a33912fad /bin | |
parent | 281cddbde10c67acbca2098b9836161675157c35 (diff) | |
download | FreeBSD-src-8a1fd26292643530761d412e06ddd50a6a782bd1.zip FreeBSD-src-8a1fd26292643530761d412e06ddd50a6a782bd1.tar.gz |
Fixed the bug from the previous revision.
``chown -h owner symlink'' did not set the symlink's owner
if the file the symlink points to already had that owner:
# ls -l alink afile
-rw-r--r-- 1 nobody ru 0 May 31 14:14 afile
lrwxr-xr-x 1 root ru 5 May 31 14:14 alink -> afile
# ./chown -h -v nobody alink
# ls -l alink afile
-rw-r--r-- 1 nobody ru 0 May 31 14:14 afile
lrwxr-xr-x 1 root ru 5 May 31 14:14 alink -> afile
Similarly for chgrp(1) and chmod(1).
Diffstat (limited to 'bin')
-rw-r--r-- | bin/chmod/chmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 97c9c02..83a31c7d 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -148,7 +148,7 @@ done: argv += optind; fts_options |= FTS_LOGICAL; } } else - fts_options = FTS_LOGICAL; + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; if (hflag) change_mode = lchmod; |