diff options
author | Jeremy Allison <jra@samba.org> | 2001-12-19 17:47:19 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-12-19 17:47:19 +0000 |
commit | a784fce1090f4c67f064cb1230a32c574ecc652d (patch) | |
tree | 6407109a3832a3e074bf18d25cf13eb12b90dd4a /source3/smbd | |
parent | 15aad7f33d69be9a46251b29d30c21d465fddf06 (diff) | |
download | samba-a784fce1090f4c67f064cb1230a32c574ecc652d.tar.gz samba-a784fce1090f4c67f064cb1230a32c574ecc652d.tar.bz2 samba-a784fce1090f4c67f064cb1230a32c574ecc652d.zip |
Allow ACL set to fail gracefully on HP HFS filesystems.
Jeremy.
(This used to be commit 2d7b81e692ac2bcfd6e31223d3f8545c255cb47c)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/posix_acls.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 324169a092..765bd0f3b2 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/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; |