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: Michael Orlitzky
Subject: Re: [Acl-devel] Getting/setting default ACLs through file descriptors
Date: Wed, 28 Feb 2018 09:21:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 02/28/2018 04:29 AM, Andreas Grünbacher wrote:
> 
> The reason acl_set_fd doesn't take a type argument is historic; it was
> specified that way in IEEE Std 1003.1e draft 17.
> 
> What you can do is use fgetxattr and fsetxattr directly. The attribute
> names are defined in <linux/xattr.h> as XATTR_NAME_POSIX_ACL_ACCESS and
> XATTR_NAME_POSIX_ACL_DEFAULT.
> 

Ah, I see. I thought about copying the implementation of acl_set_fd()
and changing the ACL_EA_ACCESS to ACL_EA_DEFAULT, but that involves
copy/pasting half of libacl.

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.



reply via email to

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