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).
This commit is contained in:
parent
7ed3b855bb
commit
01b4e93eff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77522
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user