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

Tim Kientzle kientzle at freebsd.org
Tue Jul 14 16:02:37 UTC 2009


Jilles Tjoelker wrote:
> 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 data point:  I've started looking at the *at()
functions for libarchive's deep directory handling.  The
current code uses chdir() to manipulate files with very long
pathnames, but that causes complications for libarchive
clients that I'd like to eliminate.  Using *at() functions
to manage a "virtual current directory" looks a lot more robust.

Unfortunately, there are still a few operations that are
unavailable with this paradigm:
  * ACL functions
  * extattr functions
  * link()
  * symlink()



More information about the svn-src-all mailing list