svn commit: r195458 - in head: include lib/libc/sys sys/bsm sys/compat/freebsd32 sys/compat/svr4 sys/i386/ibcs2 sys/kern sys/sys

Jilles Tjoelker jilles at stack.nl
Thu Jul 9 17:30:49 UTC 2009


On Wed, Jul 08, 2009 at 03:23:18PM +0000, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Wed Jul  8 15:23:18 2009
> New Revision: 195458
> URL: http://svn.freebsd.org/changeset/base/195458

> Log:
>   There is an optimization in chmod(1), that makes it not to call chmod(2)
>   if the new file mode is the same as it was before; however, this
>   optimization must be disabled for filesystems that support NFSv4 ACLs.
>   Chmod uses pathconf(2) to determine whether this is the case - however,
>   pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't.

>   This change adds lpathconf(3) to make it possible to solve that problem
>   in a clean way.

I think pathconfat() would be nicer than adding a function that will not
appear in standards and lacks a useful feature. Compare futimens() and
utimensat() in the 2008 POSIX spec, and notice that there is no such
thing as lutimes() in POSIX (it can be done with utimensat()).

Another consideration is that lpathconf/pathconfat may be considered
"new work". The problem I brought up can also be fixed by never using
the optimization for symlinks.

-- 
Jilles Tjoelker


More information about the svn-src-all mailing list