]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
acl-permissions, file-has-acl: Remove support for IRIX.
authorBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2025 20:52:31 +0000 (22:52 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2025 20:52:31 +0000 (22:52 +0200)
* lib/acl-internal.h (MODE_INSIDE_ACL): Remove code for IRIX.
* lib/acl-internal.c (acl_access_nontrivial): Likewise.
* lib/acl_entries.c (acl_entries): Likewise.
* lib/file-has-acl.c: Update comments.
* lib/get-permissions.c: Likewise.
* lib/set-permissions.c: Likewise.
* m4/acl.m4 (gl_FUNC_ACL): Likewise.
* doc/acl-resources.txt: Remove info about IRIX.

ChangeLog
doc/acl-resources.txt
lib/acl-internal.c
lib/acl-internal.h
lib/acl_entries.c
lib/file-has-acl.c
lib/get-permissions.c
lib/set-permissions.c
m4/acl.m4

index 23aa790dd6b0cbce7eb4585e90e20e18c506f627..d2961d359aa87454737eb533bffb7c3b5e3007ab 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2025-09-10  Bruno Haible  <bruno@clisp.org>
 
+       acl-permissions, file-has-acl: Remove support for IRIX.
+       * lib/acl-internal.h (MODE_INSIDE_ACL): Remove code for IRIX.
+       * lib/acl-internal.c (acl_access_nontrivial): Likewise.
+       * lib/acl_entries.c (acl_entries): Likewise.
+       * lib/file-has-acl.c: Update comments.
+       * lib/get-permissions.c: Likewise.
+       * lib/set-permissions.c: Likewise.
+       * m4/acl.m4 (gl_FUNC_ACL): Likewise.
+       * doc/acl-resources.txt: Remove info about IRIX.
+
        acl, file-has-acl, copy-file tests: Remove support for IRIX.
        * tests/test-file-has-acl.sh: Remove code for IRIX ACLs.
        * tests/test-set-mode-acl.sh: Likewise.
index 26593162dec73bcdf87fbb5ecb796c19cf5a8a60..f0f31cbc68f7d96df926eff69e0e58d22f5cd8d2 100644 (file)
@@ -340,49 +340,6 @@ Utilities:
   setacl
 
 
-IRIX ACLs
-
-Manual pages:
-  http://techpubs.sgi.com/library/tpl/cgi-bin/browse.cgi?cmd=search&db=man&srch=acl&coll=0650&range=0,133
-  http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/p_man/cat4/acl.z
-Includes:
-  <sys/acl.h>
-Library:
-  none needed
-Functions:
-  acl_add_perm
-  acl_calc_mask
-  acl_clear_perms
-  acl_copy_entry
-  acl_copy_ext
-  acl_copy_int
-  acl_create_entry
-  acl_delete_def_file
-  acl_delete_entry
-  acl_delete_perm
-  acl_dup
-  acl_free
-  acl_from_text
-  acl_get_entry
-  acl_get_fd
-  acl_get_file
-  acl_get_permset
-  acl_get_qualifier
-  acl_get_tag_type
-  acl_init
-  acl_set_fd
-  acl_set_file
-  acl_set_permset
-  acl_set_qualifier
-  acl_set_tag_type
-  acl_size
-  acl_to_short_text
-  acl_to_text
-  acl_valid
-Utilities:
-  chacl
-
-
 AIX ACLs
 
 Documentation:
index ca340c319a5cfef70b357e908287a9092966ebe7..11bd15c4327c2a5a05cdfb630a9458796447dbd4 100644 (file)
@@ -31,7 +31,7 @@
 # include <string.h>
 #endif
 
-#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5 */
+#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, 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, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
+# else /* Linux, FreeBSD, NetBSD >= 10, 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.
@@ -137,23 +137,6 @@ acl_access_nontrivial (acl_t acl)
     }
   return got_one;
 
-#  elif HAVE_ACL_TO_SHORT_TEXT /* IRIX */
-  /* Don't use acl_get_entry: it is undocumented.  */
-
-  int count = acl->acl_cnt;
-  int i;
-
-  for (i = 0; i < count; i++)
-    {
-      acl_entry_t ace = &acl->acl_entry[i];
-      acl_tag_t tag = ace->ae_tag;
-
-      if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ
-            || tag == ACL_OTHER_OBJ))
-        return 1;
-    }
-  return 0;
-
 #  else
 
   errno = ENOSYS;
@@ -525,7 +508,7 @@ void
 free_permission_context (struct permission_context *ctx)
 {
 #if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
   if (ctx->acl)
     acl_free (ctx->acl);
 #  if !HAVE_ACL_TYPE_EXTENDED
index f1b6d4706eec6f216ffab07e2af5e86ad5d730c3..cf41e050ec4db7d4d2438def0ae0f5b8ded72efb 100644 (file)
@@ -68,7 +68,7 @@ _GL_INLINE_HEADER_BEGIN
 
 # if HAVE_ACL_GET_FILE
 /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-/* Linux, FreeBSD, Mac OS X, IRIX, Cygwin >= 2.5 */
+/* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
 
 #  ifndef MIN_ACL_ENTRIES
 #   define MIN_ACL_ENTRIES 4
@@ -116,7 +116,7 @@ _GL_INLINE_HEADER_BEGIN
 #  endif
 
 /* Set to 0 if a file's mode is stored independently from the ACL.  */
-#  if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* Mac OS X, IRIX */
+#  if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP /* Mac OS X */
 #   define MODE_INSIDE_ACL 0
 #  endif
 
@@ -240,7 +240,7 @@ extern int acl_nontrivial (int count, struct acl *entries);
 struct permission_context {
   mode_t mode;
 #if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, IRIX, Cygwin >= 2.5 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
   acl_t acl;
 #  if !HAVE_ACL_TYPE_EXTENDED
   acl_t default_acl;
index 909a09129e443726a47f239c553eb7d3ae0bbe81..b78ba18a656cae206a0410d13cfe70b766b8083d 100644 (file)
@@ -22,7 +22,7 @@
 #include "acl-internal.h"
 
 /* This file assumes POSIX-draft like ACLs
-   (Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5).  */
+   (Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5).  */
 
 /* Return the number of entries in ACL.
    Return -1 and set errno upon failure to determine it.  */
@@ -34,8 +34,7 @@ acl_entries (acl_t acl)
 
   if (acl != NULL)
     {
-#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
-# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
+#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.  */
       acl_entry_t ace;
@@ -45,7 +44,7 @@ acl_entries (acl_t acl)
            got_one >= 0;
            got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
         count++;
-# else /* Linux, FreeBSD, NetBSD >= 10, 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;
@@ -57,10 +56,6 @@ acl_entries (acl_t acl)
         count++;
       if (got_one < 0)
         return -1;
-# endif
-#else /* IRIX */
-      /* Don't use acl_get_entry: it is undocumented.  */
-      count = acl->acl_cnt;
 #endif
     }
 
index b8aee6d9ec2dc60d8ae0e2dd0a85c82ff499269d..0dc42a91b2875a9a190fc882fff1063551b9dc22 100644 (file)
@@ -384,9 +384,9 @@ acl_nfs4_nontrivial (uint32_t *xattr, ssize_t nbytes)
 
 #if (!USE_LINUX_XATTR && USE_ACL && HAVE_ACL_GET_FILE \
      && !HAVE_ACL_EXTENDED_FILE && !HAVE_ACL_TYPE_EXTENDED)
-/* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
+/* FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
 
-# if HAVE_ACL_GET_FD && !HAVE_ACL_GET_LINK_NP /* IRIX, Cygwin >= 2.5 */
+# if HAVE_ACL_GET_FD && !HAVE_ACL_GET_LINK_NP /* Cygwin >= 2.5 */
 #  include <fcntl.h>
 #  ifdef O_PATH
 #   define acl_get_fd_np(fd, type) acl_get_fd (fd)
@@ -522,7 +522,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
 
   {
     /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-    /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5 */
+    /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, Cygwin >= 2.5 */
     int ret;
 
 #   if HAVE_ACL_EXTENDED_FILE /* Linux */
@@ -553,7 +553,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
       }
     else
       ret = -1;
-#   else /* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
+#   else /* FreeBSD, NetBSD >= 10, Cygwin >= 2.5 */
 
     acl_t acl = acl_get_fdfile (fd, name, ACL_TYPE_ACCESS, flags);
     if (acl)
@@ -562,7 +562,7 @@ fdfile_has_aclinfo (MAYBE_UNUSED int fd,
         int saved_errno = errno;
         acl_free (acl);
         errno = saved_errno;
-        /* On Linux, FreeBSD, NetBSD, IRIX,
+        /* On Linux, FreeBSD, NetBSD,
                acl_get_file (name, ACL_TYPE_ACCESS)
            and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
            either both succeed or both fail; it depends on the
index 5ea23dc44fcd58a9ae23366c72d4b65aa1426e64..9b904e8ca22510c2566257d95f70eaad9bc27b6d 100644 (file)
@@ -38,9 +38,9 @@ get_permissions (const char *name, int desc, mode_t mode,
 
 #if USE_ACL && HAVE_ACL_GET_FILE
   /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-  /* Linux, FreeBSD, Mac OS X, IRIX, Cygwin >= 2.5 */
+  /* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
 # if !HAVE_ACL_TYPE_EXTENDED
-  /* Linux, FreeBSD, IRIX, Cygwin >= 2.5 */
+  /* Linux, FreeBSD, Cygwin >= 2.5 */
 
   if (HAVE_ACL_GET_FD && desc != -1)
     ctx->acl = acl_get_fd (desc);
index 8b16186b0edd0655a9036e89afa99540316fe6b2..af0b5de228dad5cd999eea12a237159e25b04465 100644 (file)
@@ -25,7 +25,7 @@
 #include "minmax.h"
 
 #if USE_ACL
-# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Cygwin >= 2.5 */
+# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, Cygwin >= 2.5 */
 #  if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
 
 static acl_t
@@ -486,9 +486,9 @@ set_acls (struct permission_context *ctx, const char *name, int desc,
 
 # if HAVE_ACL_GET_FILE
   /* POSIX 1003.1e (draft 17 -- abandoned) specific version.  */
-  /* Linux, FreeBSD, Mac OS X, IRIX, Cygwin >= 2.5 */
+  /* Linux, FreeBSD, Mac OS X, Cygwin >= 2.5 */
 #  if !HAVE_ACL_TYPE_EXTENDED
-  /* Linux, FreeBSD, IRIX, Cygwin >= 2.5 */
+  /* Linux, FreeBSD, Cygwin >= 2.5 */
 
 #   ifndef HAVE_ACL_FROM_TEXT
 #    error Must have acl_from_text (see POSIX 1003.1e draft 17).
index 941d4ad57bc7d1e7a8120b680f0bc931293adf19..0ab7d34e2d21a7ccbbddf9c0b180757cf1109077 100644 (file)
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -1,5 +1,5 @@
 # acl.m4
-# serial 38
+# serial 39
 dnl Copyright (C) 2002, 2004-2025 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,7 @@ AC_DEFUN_ONCE([gl_FUNC_ACL],
       gl_saved_LIBS=$LIBS
 
       dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, NetBSD >= 10,
-      dnl Mac OS X, IRIX, Cygwin >= 2.5).
+      dnl Mac OS X, Cygwin >= 2.5).
       dnl -lacl is needed on GNU/Linux.
       if test $use_acl = 0; then
         AC_SEARCH_LIBS([acl_get_file], [acl],