summaryrefslogtreecommitdiff
path: root/source3/smbd/posix_acls.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-11-12 02:16:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:14 -0500
commitecd1b0fffd414b7b6e28a741e9367eb92dd031d4 (patch)
treefbfdfbcb30253e71cb03145a7f6168b734e5a024 /source3/smbd/posix_acls.c
parent5cb9d9286134ff5c75fc7b71cb9cf5216f309320 (diff)
downloadsamba-ecd1b0fffd414b7b6e28a741e9367eb92dd031d4.tar.gz
samba-ecd1b0fffd414b7b6e28a741e9367eb92dd031d4.tar.bz2
samba-ecd1b0fffd414b7b6e28a741e9367eb92dd031d4.zip
r3693: Correctly detect errno for no acl/ea support.
Jeremy (This used to be commit 089a76f611187e2ba4c3363b657905d04576109e)
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r--source3/smbd/posix_acls.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index be7f828b67..0ba4437303 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -245,7 +245,7 @@ static void store_inheritance_attributes(files_struct *fsp, canon_ace *file_ace_
SAFE_FREE(pai_buf);
DEBUG(10,("store_inheritance_attribute:%s for file %s\n", protected ? " (protected)" : "", fsp->fsp_name));
- if (ret == -1 && errno != ENOSYS)
+ if (ret == -1 && !no_acl_syscall_error(errno))
DEBUG(1,("store_inheritance_attribute: Error %s\n", strerror(errno) ));
}
@@ -2243,7 +2243,7 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
if (the_acl == NULL) {
- if (errno != ENOSYS) {
+ if (!no_acl_syscall_error(errno)) {
/*
* Only print this error message if we have some kind of ACL
* support that's not working. Otherwise we would always get this.
@@ -2408,13 +2408,9 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Some systems allow all the above calls and only fail with no ACL support
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
*/
- if (errno == ENOSYS)
+ if (no_acl_syscall_error(errno)) {
*pacl_set_support = False;
-
-#ifdef ENOTSUP
- if (errno == ENOTSUP)
- *pacl_set_support = False;
-#endif
+ }
DEBUG(2,("set_canon_ace_list: sys_acl_set_file type %s failed for file %s (%s).\n",
the_acl_type == SMB_ACL_TYPE_DEFAULT ? "directory default" : "file",
@@ -2427,13 +2423,9 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Some systems allow all the above calls and only fail with no ACL support
* when attempting to apply the acl. HPUX with HFS is an example of this. JRA.
*/
- if (errno == ENOSYS)
+ if (no_acl_syscall_error(errno)) {
*pacl_set_support = False;
-
-#ifdef ENOTSUP
- if (errno == ENOTSUP)
- *pacl_set_support = False;
-#endif
+ }
DEBUG(2,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) ));