On newer systems like Fedora 39, we can't distinguish from the 
getxattr(,XATTR_NAME_POSIX_ACL_*,,)
which filesystem we are on. The call return either success or ENODATA.
It never returns ENOTSUP as previously. Is it intentional?
This unfortunately means that we have to check for NFSv4 ACLs all the time which
makes it slightly more expensive (one more getxattr call needed)

---
 lib/file-has-acl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
index b31a2ea252..653b55f0fd 100644
--- a/lib/file-has-acl.c
+++ b/lib/file-has-acl.c
@@ -157,8 +157,10 @@ file_has_acl (char const *name, struct stat const *sb)
             return 1;
         }
 
-      if (ret < 0)
+      if (ret <= 0)
         {
+          /* On newer systems, the two previous getxattr() calls do not tell
+             us if we are on NFS/NFSv4 or local FS :( */
           /* Check for NFSv4 ACLs.  The max length of a trivial
              ACL is 6 words for owner, 6 for group, 7 for everyone,
              all times 2 because there are both allow and deny ACEs.
-- 
2.40.1


Reply via email to