From 0c55c3d7f74d42d273e0fffc8b774344eed65458 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 30 Sep 2024 09:24:09 -0700 Subject: [PATCH] file-has-acl: improve acl.h comment MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * lib/acl.h: Improve comment about ‘152’. --- lib/acl.h | 5 ++++- lib/file-has-acl.c | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/acl.h b/lib/acl.h index 07ab04250d..1a627323ec 100644 --- a/lib/acl.h +++ b/lib/acl.h @@ -65,7 +65,10 @@ struct aclinfo int err; /* A small array of char, big enough for most listxattr results. - The size is somewhat arbitrary. For internal use only. */ + The size is somewhat arbitrary; it equals the max length of a + trivial NFSv4 ACL (a size used by file-has-acl.c in 2023-2024 + but no longer relevant now), and a different value might be + better once experience is gained. For internal use only. */ char __gl_acl_ch[152]; } u; }; diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index 89faba565f..6924a616bd 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -349,8 +349,7 @@ file_has_aclinfo (char const *name, struct stat const *sb, || (S_ISDIR (sb->st_mode) && aclinfo_has_xattr (ai, XATTR_NAME_POSIX_ACL_DEFAULT)))); - /* If there is an NFSv4 ACL, follow up with a getxattr syscall - to see whether the NFSv4 ACL is nontrivial. */ + /* If there is an NFSv4 ACL, check whether it is nontrivial. */ if (nfsv4_acl) { /* A buffer large enough to hold any trivial NFSv4 ACL. -- 2.39.5