acl-devel
[Top][All Lists]
Advanced

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

Re: [Acl-devel] Getting/setting default ACLs through file descriptors


From: Andreas Grünbacher
Subject: Re: [Acl-devel] Getting/setting default ACLs through file descriptors
Date: Wed, 28 Feb 2018 17:26:18 +0100

2018-02-28 16:33 GMT+01:00 Michael Orlitzky <address@hidden>:
> On 02/28/2018 09:21 AM, Michael Orlitzky wrote:
>>
>> But so long as I don't need to modify or inspect the parent's default
>> ACL, I can simply treat them as xattrs to be copied verbatim. Thanks,
>> I'll give it a try.
>
> This works from directory to directory, but it turns out I do need to
> inspect the parent's default ACL when applying it to a file (because the
> execute permissions usually need to be masked).

There were discussions about exporting the __acl_from_xattr and
__acl_to_xattr libacl functions in the past to open up the library for
more unusual use cases, but that has never happened. I would consider
just changing the xattr values directly instead of going through
libacl in your case: as convenient as it may appear to go through
libacl, the library is somewhat over-engineered, and therefore
inefficient and hard to work with. (Have a look at fs/posix_acl.c in
the kernel.)

Andreas



reply via email to

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