On Sat, Jan 01, 2011 at 10:24:47PM -0600, Raphael Geissert wrote:
In order to provide proper mechanisms to avoid race conditions (by the means
of symlinks) when using chmod, it would be great if it provided a -h/--no-
dereference option just like chown and chgrp do.
Attached patch is a quick implementation that behaves as expected. It works by
opening (O_RDONLY) the files and using fchmod afterwards. This of course
implies that files and directories to be chmod(1)ed need to be at least
O_RDONLY. I couldn't figure out another way to implement this option safely.
That's not what -h does on the other commands; in those cases they use
lchown to change the ownership of the symlink itself--and there's no
corresponding lchmod.
Mike Stone
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org