* m4/acl.m4 (gl_FUNC_ACL): Don't test for libpacl.
* lib/acl-internal.h (rpl_acl_get_fd, rpl_acl_set_fd): Remove functions.
* lib/acl-internal.c (acl_access_nontrivial): Remove code for OSF/1.
* lib/acl_entries.c (acl_entries): Likewise.
* lib/file-has-acl.c (fdfile_has_aclinfo): Likewise.
* lib/set-permissions.c (acl_from_mode): Likewise.
* doc/acl-resources.txt: Remove info about OSF/1.
2025-09-09 Bruno Haible <bruno@clisp.org>
+ acl-permissions, file-has-acl: Remove support for OSF/1.
+ * m4/acl.m4 (gl_FUNC_ACL): Don't test for libpacl.
+ * lib/acl-internal.h (rpl_acl_get_fd, rpl_acl_set_fd): Remove functions.
+ * lib/acl-internal.c (acl_access_nontrivial): Remove code for OSF/1.
+ * lib/acl_entries.c (acl_entries): Likewise.
+ * lib/file-has-acl.c (fdfile_has_aclinfo): Likewise.
+ * lib/set-permissions.c (acl_from_mode): Likewise.
+ * doc/acl-resources.txt: Remove info about OSF/1.
+
acl, file-has-acl, copy-file tests: Remove support for OSF/1.
* tests/test-file-has-acl.sh: Remove code for OSF/1 ACLs.
* tests/test-set-mode-acl.sh: Likewise.
chacl
-Tru64 ACLs
-
-Manual pages:
- https://backdrift.org/man/tru64/man4/acl.4.html
- https://backdrift.org/man/tru64/man3/acl_add_perm.3.html
- https://backdrift.org/man/tru64/man3/acl_clear_perm.3.html
- https://backdrift.org/man/tru64/man3/acl_copy_entry.3.html
- https://backdrift.org/man/tru64/man3/acl_copy_ext.3.html
- https://backdrift.org/man/tru64/man3/acl_copy_int.3.html
- https://backdrift.org/man/tru64/man3/acl_create_entry.3.html
- https://backdrift.org/man/tru64/man3/acl_delete_def_fd.3.html
- https://backdrift.org/man/tru64/man3/acl_delete_def_file.3.html
- https://backdrift.org/man/tru64/man3/acl_delete_entry.3.html
- https://backdrift.org/man/tru64/man3/acl_delete_perm.3.html
- https://backdrift.org/man/tru64/man3/acl_dup.3.html
- https://backdrift.org/man/tru64/man3/acl_first_entry.3.html
- https://backdrift.org/man/tru64/man3/acl_free.3.html
- https://backdrift.org/man/tru64/man3/acl_free_qualifier.3.html
- https://backdrift.org/man/tru64/man3/acl_free_text.3.html
- https://backdrift.org/man/tru64/man3/acl_from_text.3.html
- https://backdrift.org/man/tru64/man3/acl_get_entry.3.html
- https://backdrift.org/man/tru64/man3/acl_get_fd.3.html
- https://backdrift.org/man/tru64/man3/acl_get_file.3.html
- https://backdrift.org/man/tru64/man3/acl_get_permset.3.html
- https://backdrift.org/man/tru64/man3/acl_get_qualifier.3.html
- https://backdrift.org/man/tru64/man3/acl_get_tag_type.3.html
- https://backdrift.org/man/tru64/man3/acl_init.3.html
- https://backdrift.org/man/tru64/man3/acl_set_fd.3.html
- https://backdrift.org/man/tru64/man3/acl_set_file.3.html
- https://backdrift.org/man/tru64/man3/acl_set_permset.3.html
- https://backdrift.org/man/tru64/man3/acl_set_qualifier.3.html
- https://backdrift.org/man/tru64/man3/acl_set_tag_type.3.html
- https://backdrift.org/man/tru64/man3/acl_size.3.html
- https://backdrift.org/man/tru64/man3/acl_to_text.3.html
- https://backdrift.org/man/tru64/man3/acl_valid.3.html
-Includes:
- <sys/acl.h>
-Library:
- -lpacl
-Functions:
- acl_add_perm
- acl_clear_perm
- acl_copy_entry
- acl_copy_ext
- acl_copy_int
- acl_create_entry
- acl_delete_def_fd
- acl_delete_def_file
- acl_delete_entry
- acl_delete_perm
- acl_dup
- acl_first_entry
- acl_free
- acl_free_qualifier
- acl_free_text
- 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_text
- acl_valid
-Unportable functions:
- acl_add_entry
- acl_delete_access_fd
- acl_delete_access_file
- acl_delete_def_dir_fd
- acl_delete_def_dir_file
- acl_ext_to_text
- acl_find_entry
- acl_get
- acl_mod_perm
- acl_set
- acl_to_fmt_text
- allocate_acl_entry
- convert_to_er
- isaclprop
-Utilities:
- getacl
- setacl
-
-
AIX ACLs
Documentation:
# include <string.h>
#endif
-#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+#if USE_ACL && HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5 */
# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */
return (acl_entries (acl) > 0);
}
-# else /* Linux, FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
+# else /* Linux, FreeBSD, NetBSD >= 10, IRIX, 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.
}
return 0;
-# elif HAVE_ACL_FREE_TEXT /* Tru64 */
- /* Don't use acl_get_entry: it takes only one argument and does not work. */
-
- int count = acl->acl_num;
- acl_entry_t ace;
-
- for (ace = acl->acl_first; count > 0; ace = ace->next, count--)
- {
- acl_tag_t tag;
- acl_perm_t perm;
-
- tag = ace->entry->acl_type;
- if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
- return 1;
-
- perm = ace->entry->acl_perm;
- /* On Tru64, perm can also contain non-standard bits such as
- PERM_INSERT, PERM_DELETE, PERM_MODIFY, PERM_LOOKUP, ... */
- if ((perm & ~(ACL_READ | ACL_WRITE | ACL_EXECUTE)) != 0)
- return 1;
- }
- return 0;
-
# else
errno = ENOSYS;
free_permission_context (struct permission_context *ctx)
{
#if USE_ACL
-# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+# if HAVE_ACL_GET_FILE /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5 */
if (ctx->acl)
acl_free (ctx->acl);
# if !HAVE_ACL_TYPE_EXTENDED
# if HAVE_ACL_GET_FILE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
-/* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+/* Linux, FreeBSD, Mac OS X, IRIX, Cygwin >= 2.5 */
# ifndef MIN_ACL_ENTRIES
# define MIN_ACL_ENTRIES 4
/* POSIX 1003.1e (draft 17) */
# ifdef HAVE_ACL_GET_FD
-/* Most platforms have a 1-argument acl_get_fd, only OSF/1 has a 2-argument
- macro(!). */
-# if HAVE_ACL_FREE_TEXT /* OSF/1 */
-ACL_INTERNAL_INLINE acl_t
-rpl_acl_get_fd (int fd)
-{
- return acl_get_fd (fd, ACL_TYPE_ACCESS);
-}
-# undef acl_get_fd
-# define acl_get_fd rpl_acl_get_fd
-# endif
+/* acl_get_fd takes one argument. */
# else
# define HAVE_ACL_GET_FD false
# undef acl_get_fd
/* POSIX 1003.1e (draft 17) */
# ifdef HAVE_ACL_SET_FD
-/* Most platforms have a 2-argument acl_set_fd, only OSF/1 has a 3-argument
- macro(!). */
-# if HAVE_ACL_FREE_TEXT /* OSF/1 */
-ACL_INTERNAL_INLINE int
-rpl_acl_set_fd (int fd, acl_t acl)
-{
- return acl_set_fd (fd, ACL_TYPE_ACCESS, acl);
-}
-# undef acl_set_fd
-# define acl_set_fd rpl_acl_set_fd
-# endif
+/* acl_set_fd takes two arguments. */
# else
# define HAVE_ACL_SET_FD false
# undef acl_set_fd
struct permission_context {
mode_t mode;
#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, Mac OS X, IRIX, Cygwin >= 2.5 */
acl_t acl;
# if !HAVE_ACL_TYPE_EXTENDED
acl_t default_acl;
#include "acl-internal.h"
/* This file assumes POSIX-draft like ACLs
- (Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5). */
+ (Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5). */
/* Return the number of entries in ACL.
Return -1 and set errno upon failure to determine it. */
if (got_one < 0)
return -1;
# endif
-#else /* IRIX, Tru64 */
-# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
+#else /* IRIX */
/* Don't use acl_get_entry: it is undocumented. */
count = acl->acl_cnt;
-# endif
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
- /* Don't use acl_get_entry: it takes only one argument and does not
- work. */
- count = acl->acl_num;
-# endif
#endif
}
#if (!USE_LINUX_XATTR && USE_ACL && HAVE_ACL_GET_FILE \
&& !HAVE_ACL_EXTENDED_FILE && !HAVE_ACL_TYPE_EXTENDED)
-/* FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
+/* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
-# if HAVE_ACL_GET_FD && !HAVE_ACL_GET_LINK_NP /* IRIX, Tru64, Cygwin >= 2.5 */
+# if HAVE_ACL_GET_FD && !HAVE_ACL_GET_LINK_NP /* IRIX, Cygwin >= 2.5 */
# include <fcntl.h>
# ifdef O_PATH
# define acl_get_fd_np(fd, type) acl_get_fd (fd)
{
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
- /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+ /* Linux, FreeBSD, NetBSD >= 10, Mac OS X, IRIX, Cygwin >= 2.5 */
int ret;
# if HAVE_ACL_EXTENDED_FILE /* Linux */
}
else
ret = -1;
-# else /* FreeBSD, NetBSD >= 10, IRIX, Tru64, Cygwin >= 2.5 */
+# else /* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
acl_t acl = acl_get_fdfile (fd, name, ACL_TYPE_ACCESS, flags);
if (acl)
int saved_errno = errno;
acl_free (acl);
errno = saved_errno;
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
- /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
- returns NULL with errno not set. There is no point in
- making this call. */
-# else /* FreeBSD, NetBSD >= 10, IRIX, Cygwin >= 2.5 */
/* On Linux, FreeBSD, NetBSD, IRIX,
acl_get_file (name, ACL_TYPE_ACCESS)
and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
acl = acl_get_fdfile (fd, name, ACL_TYPE_DEFAULT, flags);
if (acl)
{
-# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
+# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
ret = acl_access_nontrivial (acl);
saved_errno = errno;
acl_free (acl);
errno = saved_errno;
-# else
+# else
ret = (0 < acl_entries (acl));
acl_free (acl);
-# endif
+# endif
}
else
{
ret = -1;
-# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
+# ifdef __CYGWIN__ /* Cygwin >= 2.5 */
if (d_type == DT_UNKNOWN)
ret = 0;
-# endif
+# endif
}
}
-# endif
}
else
ret = -1;
#include "minmax.h"
#if USE_ACL
-# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
+# if ! defined HAVE_ACL_FROM_MODE && defined HAVE_ACL_FROM_TEXT /* FreeBSD, IRIX, Cygwin >= 2.5 */
# if HAVE_ACL_GET_FILE && !HAVE_ACL_TYPE_EXTENDED
static acl_t
acl_from_mode (mode_t mode)
{
-# if HAVE_ACL_FREE_TEXT /* Tru64 */
- char acl_text[] = "u::---,g::---,o::---,";
-# else /* FreeBSD, IRIX, Cygwin >= 2.5 */
char acl_text[] = "u::---,g::---,o::---";
-# endif
if (mode & S_IRUSR) acl_text[ 3] = 'r';
if (mode & S_IWUSR) acl_text[ 4] = 'w';
# if HAVE_ACL_GET_FILE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
- /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >= 2.5 */
+ /* Linux, FreeBSD, Mac OS X, IRIX, Cygwin >= 2.5 */
# if !HAVE_ACL_TYPE_EXTENDED
- /* Linux, FreeBSD, IRIX, Tru64, Cygwin >= 2.5 */
+ /* Linux, FreeBSD, IRIX, Cygwin >= 2.5 */
# ifndef HAVE_ACL_FROM_TEXT
# error Must have acl_from_text (see POSIX 1003.1e draft 17).
# acl.m4
-# serial 37
+# serial 38
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,
gl_saved_LIBS=$LIBS
dnl Test for POSIX-draft-like API (GNU/Linux, FreeBSD, NetBSD >= 10,
- dnl Mac OS X, IRIX, Tru64, Cygwin >= 2.5).
- dnl -lacl is needed on GNU/Linux, -lpacl on OSF/1.
+ dnl Mac OS X, IRIX, Cygwin >= 2.5).
+ dnl -lacl is needed on GNU/Linux.
if test $use_acl = 0; then
- AC_SEARCH_LIBS([acl_get_file], [acl pacl],
+ AC_SEARCH_LIBS([acl_get_file], [acl],
[if test "$ac_cv_search_acl_get_file" != "none required"; then
LIB_ACL=$ac_cv_search_acl_get_file
fi