[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Fix solaris acl support breakage
From: |
Ben Walton |
Subject: |
[PATCH] Fix solaris acl support breakage |
Date: |
Wed, 25 Nov 2009 08:49:27 -0500 |
Solaris has support for ACL's on NFS, but only in certain combinations
of client and server. When ACL operations are attempted in
unsupported situations, EOPNOTSUPP can be returned instead of ENOSYS.
This patch allows utilities that work with ACL's to handle the
difference properly.
Signed-off-by: Ben Walton <address@hidden>
---
lib/copy-acl.c | 4 ++--
lib/set-mode-acl.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/copy-acl.c b/lib/copy-acl.c
index af85a08..bfacf20 100644
--- a/lib/copy-acl.c
+++ b/lib/copy-acl.c
@@ -294,7 +294,7 @@ qcopy_acl (const char *src_name, int source_desc, const
char *dst_name,
if (count < 0)
{
- if (errno == ENOSYS || errno == ENOTSUP)
+ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP)
{
count = 0;
entries = NULL;
@@ -358,7 +358,7 @@ qcopy_acl (const char *src_name, int source_desc, const
char *dst_name,
if (ret < 0 && saved_errno == 0)
{
saved_errno = errno;
- if (errno == ENOSYS && !acl_nontrivial (count, entries))
+ if ((errno == ENOSYS || errno == EOPNOTSUPP) && !acl_nontrivial
(count, entries))
saved_errno = 0;
}
else
diff --git a/lib/set-mode-acl.c b/lib/set-mode-acl.c
index ddac4df..fdc74f2 100644
--- a/lib/set-mode-acl.c
+++ b/lib/set-mode-acl.c
@@ -387,7 +387,7 @@ qset_acl (char const *name, int desc, mode_t mode)
ret = acl (name, SETACL, sizeof (entries) / sizeof (aclent_t), entries);
if (ret < 0)
{
- if (errno == ENOSYS)
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
return chmod_or_fchmod (name, desc, mode);
return -1;
}
--
1.6.5.1