diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-05-31 11:47:20 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-05-31 11:47:20 +0000 |
commit | 01b4e93eff0a3deb27ee59f49e0961cb949a321e (patch) | |
tree | 87f1d48852dbec3bd2ad91320bac9a2d6a23d995 /bin/chmod | |
parent | 7ed3b855bbc19f40f68afbd58ea19674729da21a (diff) | |
download | src-01b4e93eff0a3deb27ee59f49e0961cb949a321e.tar.gz src-01b4e93eff0a3deb27ee59f49e0961cb949a321e.zip |
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).
Notes
Notes:
svn path=/head/; revision=77522
Diffstat (limited to 'bin/chmod')
-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 97c9c02f0729..83a31c7d92fc 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; |