* lib/acl-internal.h (MODE_INSIDE_ACL): Define to 0 on IRIX.
* lib/set-mode-acl.c (qset_acl): Test !HAVE_ACL_TYPE_EXTENDED instead
of MODE_INSIDE_ACL. If !MODE_INSIDE_ACL, do a chmod_or_fchmod always.
* lib/copy-acl.c (qcopy_acl): Likewise.
+2011-09-06 Bruno Haible <bruno@clisp.org>
+
+ acl: Fix a test failure on IRIX 6.5 with NFS.
+ * lib/acl-internal.h (MODE_INSIDE_ACL): Define to 0 on IRIX.
+ * lib/set-mode-acl.c (qset_acl): Test !HAVE_ACL_TYPE_EXTENDED instead
+ of MODE_INSIDE_ACL. If !MODE_INSIDE_ACL, do a chmod_or_fchmod always.
+ * lib/copy-acl.c (qcopy_acl): Likewise.
+
2011-09-05 Paul Eggert <eggert@cs.ucla.edu>
openat: port to AIX 7.1 with large files
/* Set to 1 if a file's mode is implicit by the ACL.
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 /* MacOS X */
+# if (HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP) || defined __sgi /* MacOS X, IRIX */
# define MODE_INSIDE_ACL 0
# else
# define MODE_INSIDE_ACL 1
#if USE_ACL && HAVE_ACL_GET_FILE
/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
-# if MODE_INSIDE_ACL
+# if !HAVE_ACL_TYPE_EXTENDED
/* Linux, FreeBSD, IRIX, Tru64 */
acl_t acl;
else
acl_free (acl);
- if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
{
/* We did not call chmod so far, and either the mode and the ACL are
separate or special bits are to be set which don't fit into ACLs. */
}
return 0;
-# else /* !MODE_INSIDE_ACL */
+# else /* HAVE_ACL_TYPE_EXTENDED */
/* MacOS X */
-# if !HAVE_ACL_TYPE_EXTENDED
-# error Must have ACL_TYPE_EXTENDED
-# endif
-
/* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
and acl_get_file (name, ACL_TYPE_DEFAULT)
always return NULL / EINVAL. You have to use
# if HAVE_ACL_GET_FILE
/* POSIX 1003.1e draft 17 (abandoned) specific version. */
/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
-# if MODE_INSIDE_ACL
+# if !HAVE_ACL_TYPE_EXTENDED
/* Linux, FreeBSD, IRIX, Tru64 */
/* We must also have acl_from_text and acl_delete_def_file.
if (S_ISDIR (mode) && acl_delete_def_file (name))
return -1;
- if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
{
- /* We did not call chmod so far, so the special bits have not yet
- been set. */
+ /* We did not call chmod so far, and either the mode and the ACL are
+ separate or special bits are to be set which don't fit into ACLs. */
return chmod_or_fchmod (name, desc, mode);
}
return 0;
-# else /* !MODE_INSIDE_ACL */
+# else /* HAVE_ACL_TYPE_EXTENDED */
/* MacOS X */
-# if !HAVE_ACL_TYPE_EXTENDED
-# error Must have ACL_TYPE_EXTENDED
-# endif
-
/* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
and acl_get_file (name, ACL_TYPE_DEFAULT)
always return NULL / EINVAL. You have to use