bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modify chmod


From: Jim Meyering
Subject: Re: modify chmod
Date: Mon, 01 Feb 2010 08:14:38 +0100

Paul Eggert wrote:
> Jim Meyering <address@hidden> writes:
>> This new behavior could be useful...
>> maybe noticeably more efficient in some cases, too.
>> Perhaps worth a new option, if not the default.
>
> In rereading the old bug report, I noticed that FreeBSD is listed as the
> only OS that does things the more-efficient way.  I looked at the
> FreeBSD 8.0 chmod.c source, and what it actually does is apply the
> optimization only if it knows that the file system does not have ACLs
> (it calls something named "may_have_nfs4acl", because apparently NFSv4
> ACLs might change even if you apply a mode that's the same as before).
> I suggest that we do something similar.

Good idea.

I took a look.  It uses pathconf/lpathconf with _PC_ACL_NFS4.
Since in general, we have neither the lpathconf function,
nor its _PC_ACL_NFS4, we'll have to roll our own.  But that
is not too hard:  it can do the same sort of thing fts.c does,
in calling fstatfs and comparing statfs.f_type to at least
S_MAGIC_NFS (from fs.h).

IMHO, it's fine to limit this optimization to systems that
provide fstatfs.

Jeff, are you still interested in pursuing this?
If so, please start the copyright assignment process with
your employer.  See the "Copyright assignment" section
in the HACKING file:
  http://git.sv.gnu.org/cgit/coreutils.git/plain/HACKING




reply via email to

[Prev in Thread] Current Thread [Next in Thread]