summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-12-19 17:47:19 +0000
committerJeremy Allison <jra@samba.org>2001-12-19 17:47:19 +0000
commit2d7b81e692ac2bcfd6e31223d3f8545c255cb47c (patch)
tree2eef8e1db47b17809352a4dc3c3414f7638934d8
parent1bf5c1a46f4c3f44054ce8fcbc551cdb72683f2b (diff)
downloadsamba-2d7b81e692ac2bcfd6e31223d3f8545c255cb47c.tar.gz
Allow ACL set to fail gracefully on HP HFS filesystems.
Jeremy.
-rw-r--r--source/smbd/posix_acls.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c
index 324169a0922..765bd0f3b26 100644
--- a/source/smbd/posix_acls.c
+++ b/source/smbd/posix_acls.c
@@ -1716,6 +1716,12 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
if(default_ace || fsp->is_directory || fsp->fd == -1) {
if (sys_acl_set_file(fsp->fsp_name, the_acl_type, the_acl) == -1) {
+ /*
+ * 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)
+ *pacl_set_support = False;
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",
fsp->fsp_name, strerror(errno) ));
@@ -1723,6 +1729,12 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
}
} else {
if (sys_acl_set_fd(fsp->fd, the_acl) == -1) {
+ /*
+ * 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)
+ *pacl_set_support = False;
DEBUG(2,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) ));
goto done;