Fixes Coreutils bug 6053.
* lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
so that it is available for HP-UX.
* lib/copy-acl.c (qcopy_acl): Use it.
Reported by Patrick M. Callahan.
Signed-off-by: Eric Blake <eblake@redhat.com>
+2010-08-10 Pádraig Brady <P@draigbrady.com>
+ and Eric Blake <eblake@redhat.com>
+
+ copy-acl: ignore ENOTSUP on HP-UX
+ * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up,
+ so that it is available for HP-UX.
+ * lib/copy-acl.c (qcopy_acl): Use it.
+ Reported by Patrick M. Callahan.
+
2010-08-10 Eric Blake <eblake@redhat.com>
open, chown: relax license
2010-08-10 Eric Blake <eblake@redhat.com>
open, chown: relax license
# define fchmod(fd, mode) (-1)
#endif
# define fchmod(fd, mode) (-1)
#endif
+/* Recognize some common errors such as from an NFS mount that does
+ not support ACLs, even when local drives do. */
+#if defined __APPLE__ && defined __MACH__ /* MacOS X */
+# define ACL_NOT_WELL_SUPPORTED(Err) \
+ ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT)
+#elif defined EOPNOTSUPP /* Tru64 NFS */
+# define ACL_NOT_WELL_SUPPORTED(Err) \
+ ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP)
+#else
+# define ACL_NOT_WELL_SUPPORTED(Err) \
+ ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY)
+#endif
# define MODE_INSIDE_ACL 1
# endif
# define MODE_INSIDE_ACL 1
# endif
-# if defined __APPLE__ && defined __MACH__ /* MacOS X */
-# define ACL_NOT_WELL_SUPPORTED(Err) \
- ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT)
-# elif defined EOPNOTSUPP /* Tru64 NFS */
-# define ACL_NOT_WELL_SUPPORTED(Err) \
- ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP)
-# else
-# define ACL_NOT_WELL_SUPPORTED(Err) \
- ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY)
-# endif
-
/* Return the number of entries in ACL.
Return -1 and set errno upon failure to determine it. */
/* Define a replacement for acl_entries if needed. (Only Linux has it.) */
/* Return the number of entries in ACL.
Return -1 and set errno upon failure to determine it. */
/* Define a replacement for acl_entries if needed. (Only Linux has it.) */
- if (errno == ENOSYS || errno == EOPNOTSUPP)
+ if (ACL_NOT_WELL_SUPPORTED (errno))
{
int saved_errno = errno;
{
int saved_errno = errno;
- if (errno == ENOSYS || errno == EOPNOTSUPP)
+ if (ACL_NOT_WELL_SUPPORTED (errno))
{
struct stat source_statbuf;
{
struct stat source_statbuf;