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 /usr.sbin/chown | |
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 'usr.sbin/chown')
-rw-r--r-- | usr.sbin/chown/chown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index b86af0e..87eb8c2 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -133,7 +133,7 @@ main(argc, argv) fts_options |= FTS_LOGICAL; } } else - fts_options = FTS_LOGICAL; + fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL; uid = gid = -1; if (ischown) { |