]> Savannah Git Hosting - gnulib.git/commit
file-has-acl: scontext even if --disable-acl
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Nov 2024 15:35:50 +0000 (07:35 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Nov 2024 15:53:27 +0000 (07:53 -0800)
commit771fe316ce8041663a84fdb38ccc7419e6231e0c
tree83d21f6754f02ab7ebf7145ee260e768d65a93d6
parentee0bc695303775da5026091a65e8ec2b764f4a26
file-has-acl: scontext even if --disable-acl

Be able to get the security context even if configured with
--disable-acl, as security contexts are not ACLs, and the
main reason for --disable-acl was for efficiency with GNU ls -l,
a concern that does not apply to security contexts (which are
needed only with ls -Z).  Problem reported by Pádraig Brady
<https://bugs.gnu.org/73418#52>.
* lib/acl.h (ACL_GET_SCONTEXT): New constant.
(aclinfo_free, aclinfo_scontext_free): Declare even if !USE_ACL.
* lib/file-has-acl.c (USE_LINUX_XATTR): No longer false merely
because !USE_ACL, because we need xattr to get scontext.
(get_aclinfo): Support new ACL_GET_SCONTEXT flag.
ChangeLog
lib/acl.h
lib/file-has-acl.c