]> Savannah Git Hosting - gnulib.git/commitdiff
acl-permissions: Update comments regarding NetBSD.
authorBruno Haible <bruno@clisp.org>
Sat, 29 Mar 2025 11:46:14 +0000 (12:46 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 29 Mar 2025 11:46:14 +0000 (12:46 +0100)
* lib/acl-internal.c: Update comments.
* lib/acl_entries.c: Likewise.
* tests/test-file-has-acl.sh: Likewise.
* tests/test-copy-acl.sh: Likewise.

ChangeLog
lib/acl-internal.c
lib/acl_entries.c
tests/test-copy-acl.sh
tests/test-file-has-acl.sh

index 9f0f64aa6d7714201b452824ba88c11ba00f5325..58195260cf6e26b730ae2a33f48c9b5868a6ba9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2025-03-29  Bruno Haible  <bruno@clisp.org>
+
+       acl-permissions: Update comments regarding NetBSD.
+       * lib/acl-internal.c: Update comments.
+       * lib/acl_entries.c: Likewise.
+       * tests/test-file-has-acl.sh: Likewise.
+       * tests/test-copy-acl.sh: Likewise.
+
 2025-03-28  Collin Funk  <collin.funk1@gmail.com>
 
        doc: Document NetBSD acl functions.
index 1a6087b03a9ad2b49feefe869d7de494ef992f04..6c50feacbb811da92da9a68d544132d87ad8dbf3 100644 (file)
@@ -31,7 +31,7 @@
 # include <string.h>
 #endif
 
-#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
 
 # if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
 
@@ -45,7 +45,7 @@ acl_extended_nontrivial (acl_t acl)
   return (acl_entries (acl) > 0);
 }
 
-# else /* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
+# else /* Linux, FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
 
 /* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
    Return 1 if the given ACL is non-trivial.
@@ -59,7 +59,7 @@ acl_access_nontrivial (acl_t acl)
      at least, allowing us to write
         return (3 < acl_entries (acl));
      but the following code is more robust.  */
-#  if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Cygwin >= 2.5 */
+#  if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
 
   acl_entry_t ace;
   int got_one;
@@ -548,7 +548,7 @@ void
 free_permission_context (struct permission_context *ctx)
 {
 #if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
   if (ctx->acl)
     acl_free (ctx->acl);
 #  if !HAVE_ACL_TYPE_EXTENDED
index 808ad93fe2c17755715ec6a165e6d68c0c8075fd..57b7b4998c07c6d52103a3cf5d318b61b36e0c21 100644 (file)
@@ -22,7 +22,7 @@
 #include "acl-internal.h"
 
 /* This file assumes POSIX-draft like ACLs
-   (Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5).  */
+   (Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5).  */
 
 /* Return the number of entries in ACL.
    Return -1 and set errno upon failure to determine it.  */
@@ -34,7 +34,7 @@ acl_entries (acl_t acl)
 
   if (acl != NULL)
     {
-#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
+#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
 # if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
       /* acl_get_entry returns 0 when it successfully fetches an entry,
          and -1/EINVAL at the end.  */
@@ -45,7 +45,7 @@ acl_entries (acl_t acl)
            got_one >= 0;
            got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
         count++;
-# else /* Linux, FreeBSD, Cygwin >= 2.5 */
+# else /* Linux, FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
       /* acl_get_entry returns 1 when it successfully fetches an entry,
          and 0 at the end.  */
       acl_entry_t ace;
index 50beba05d3bde546fbf4ecfc6d35b98c1d3848a9..8efe202afb887f461fcaede21e05410de225731a 100755 (executable)
@@ -70,7 +70,7 @@ cd "$builddir" ||
   acl_flavor=none
   if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then
     # Platforms with the getfacl and setfacl programs.
-    # Linux, FreeBSD, Solaris, Cygwin.
+    # Linux, FreeBSD, NetBSD >= 10, Solaris, Cygwin.
     if (setfacl --help >/dev/null) 2>/dev/null; then
       # Linux, Cygwin.
       if (LC_ALL=C setfacl --help | grep ' --set-file' >/dev/null) 2>/dev/null; then
@@ -80,9 +80,9 @@ cd "$builddir" ||
         acl_flavor=cygwin
       fi
     else
-      # FreeBSD, Solaris.
+      # FreeBSD, NetBSD >= 10, Solaris.
       if (LC_ALL=C setfacl 2>&1 | grep '\-x entries' >/dev/null) 2>/dev/null; then
-        # FreeBSD.
+        # FreeBSD, NetBSD >= 10.
         acl_flavor=freebsd
       else
         # Solaris.
index 8703b02e8850240fb9861f066d43ab7df555504d..1e791f3ae8cd3c8ea256dce920956357ee077f01 100755 (executable)
@@ -70,7 +70,7 @@ cd "$builddir" ||
   acl_flavor=none
   if (getfacl tmpfile0 >/dev/null) 2>/dev/null; then
     # Platforms with the getfacl and setfacl programs.
-    # Linux, FreeBSD, Solaris, Cygwin.
+    # Linux, FreeBSD, NetBSD >= 10, Solaris, Cygwin.
     if (setfacl --help >/dev/null) 2>/dev/null; then
       # Linux, Cygwin.
       if (LC_ALL=C setfacl --help | grep ' --test' >/dev/null) 2>/dev/null; then
@@ -80,9 +80,9 @@ cd "$builddir" ||
         acl_flavor=cygwin
       fi
     else
-      # FreeBSD, Solaris.
+      # FreeBSD, NetBSD >= 10, Solaris.
       if (LC_ALL=C setfacl 2>&1 | grep '\-x entries' >/dev/null) 2>/dev/null; then
-        # FreeBSD.
+        # FreeBSD, NetBSD >= 10.
         acl_flavor=freebsd
       else
         # Solaris.