On 2025-05-12 05:24, Bruno Haible wrote:
Hi Pádraig,
I checked one centos 7 system, and it didn't have a /etc/xattr.conf file
which might explain the behavior noticed above.
Then on centos 8 we have:
system.nfs4_acl permissions
system.nfs4acl permissions
system.posix_acl_access permissions
system.posix_acl_default permissions
While on Fedora 42 we have:
system.posix_acl_access permissions
system.posix_acl_default permissions
And what do you suggest?
- Do you suggest that on CentOS 7, the lack of a /etc/xattr.conf file
should be considered like an intention to NOT copy any ACL xattrs,
and that therefore the aforementioned unit tests SHOULD fail?
- Do you suggest that on Fedora 42, the lack of the system.nfs4*acl in
/etc/xattr.conf should be considered like an intention to NOT copy
NFSv4 ACLs, and that therefore copying files with such ACLs SHOULD
produce errors since they are not supported?
Yes, as I understand it, that's the intent: a missing xattr.conf means
that no xattr is an ACL, and an xattr.conf that omits system.nfs4*acl
means those NFSv4 xattrs are not ACLs.
Which is obviously wrong, and which is why current Gnulib qcopy-acl.c
overrides this intent by copying system.nfs4_acl,
system.posix_acl_access, and system.posix_acl_default xattrs regardless
of what /etc/xattr.conf says.
Is there any system where /etc/xattr.conf exists and lists something
other than the Gnulib-specified overrides as a permissions attribute? If
not, perhaps the Gnulib code should stop invoking attr_copy_action, as
in practice xattr.conf does not supply useful information to programs
that want to copy ACLs. Something like the following untested patch, say?
diff --git a/lib/qcopy-acl.c b/lib/qcopy-acl.c
index 282f4b2d2a..e44f4a942e 100644
--- a/lib/qcopy-acl.c
+++ b/lib/qcopy-acl.c
@@ -52,8 +52,7 @@ is_attr_permissions (const char *name, struct
error_context *\
ctx)
because at least on CentOS 7, attr_copy_action does not do it.
*/
return strcmp (name, XATTR_NAME_POSIX_ACL_ACCESS) == 0
|| strcmp (name, XATTR_NAME_POSIX_ACL_DEFAULT) == 0
- || strcmp (name, XATTR_NAME_NFSV4_ACL) == 0
- || attr_copy_action (name, ctx) == ATTR_ACTION_PERMISSIONS;
+ || strcmp (name, XATTR_NAME_NFSV4_ACL) == 0;
}
#endif /* USE_XATTR */