]> Savannah Git Hosting - gnulib.git/commit
chown: work around symlink issues on odd platforms
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Sep 2023 16:53:02 +0000 (09:53 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Sep 2023 16:55:17 +0000 (09:55 -0700)
commit08c28bd6013b2b0c630daea6eb93369c04569f40
tree6913e2663685b5c9284db94738e01a1490d69816
parent11ee0fc8cdda3a58379f39d7144f5983b418ab3a
chown: work around symlink issues on odd platforms

Problem reported by Jordi Sanfeliu in:
https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00116.html
* lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
Do not declare unused locals st, stat_valid.
Redo to just call chown if arg is a symlink.
This induces a race but is perhaps the best we can do easily
on oddball platforms where chown does not follow symlinks.
ChangeLog
lib/chown.c