summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_zfsacl.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-10-13 21:06:49 +0200
committerMichael Adam <obnox@samba.org>2007-11-13 15:47:01 +0100
commit15953b82eb3b49d736b4b835b1d0d3cf0da0bff8 (patch)
tree4b3d872f0e8747386fb21fc1a893c0558aa2fc75 /source3/modules/vfs_zfsacl.c
parent9441d1ba87313e0ecc6e6971a25e7ad0c280fdd7 (diff)
downloadsamba-15953b82eb3b49d736b4b835b1d0d3cf0da0bff8.tar.gz
samba-15953b82eb3b49d736b4b835b1d0d3cf0da0bff8.tar.bz2
samba-15953b82eb3b49d736b4b835b1d0d3cf0da0bff8.zip
Make [f]get_nt_acl return NTSTATUS
(This used to be commit dcbe1bf942d017a3cd5084c6ef605a13912f795b)
Diffstat (limited to 'source3/modules/vfs_zfsacl.c')
-rw-r--r--source3/modules/vfs_zfsacl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c
index a817022032..d265931cf2 100644
--- a/source3/modules/vfs_zfsacl.c
+++ b/source3/modules/vfs_zfsacl.c
@@ -34,7 +34,7 @@
* read the local file's acls and return it in NT form
* using the NFSv4 format conversion
*/
-static size_t zfs_get_nt_acl(struct files_struct *fsp, uint32 security_info,
+static NTSTATUS zfs_get_nt_acl(struct files_struct *fsp, uint32 security_info,
struct security_descriptor **ppdesc)
{
int naces, i;
@@ -50,20 +50,19 @@ static size_t zfs_get_nt_acl(struct files_struct *fsp, uint32 security_info,
DEBUG(9, ("acl(ACE_GETACLCNT, %s): %s ", fsp->fsp_name,
strerror(errno)));
}
- return 0;
+ return map_nt_error_from_unix(errno);
}
/* allocate the field of ZFS aces */
mem_ctx = talloc_tos();
acebuf = (ace_t *) talloc_size(mem_ctx, sizeof(ace_t)*naces);
if(acebuf == NULL) {
- errno = ENOMEM;
- return 0;
+ return NT_STATUS_NO_MEMORY;
}
/* read the aces into the field */
if(acl(fsp->fsp_name, ACE_GETACL, naces, acebuf) < 0) {
DEBUG(9, ("acl(ACE_GETACL, %s): %s ", fsp->fsp_name,
strerror(errno)));
- return 0;
+ return map_nt_error_from_unix(errno);
}
/* create SMB4ACL data */
if((pacl = smb_create_smb4acl()) == NULL) return 0;
@@ -87,7 +86,8 @@ static size_t zfs_get_nt_acl(struct files_struct *fsp, uint32 security_info,
} else {
aceprop.flags = 0;
}
- if(smb_add_ace4(pacl, &aceprop) == NULL) return 0;
+ if(smb_add_ace4(pacl, &aceprop) == NULL)
+ return NT_STATUS_NO_MEMORY;
}
return smb_get_nt_acl_nfs4(fsp, security_info, ppdesc, pacl);
@@ -164,7 +164,7 @@ static NTSTATUS zfs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
zfs_process_smbacl);
}
-static size_t zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,
+static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
int fd, uint32 security_info,
struct security_descriptor **ppdesc)
@@ -172,7 +172,7 @@ static size_t zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,
return zfs_get_nt_acl(fsp, security_info, ppdesc);
}
-static size_t zfsacl_get_nt_acl(struct vfs_handle_struct *handle,
+static NTSTATUS zfsacl_get_nt_acl(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const char *name, uint32 security_info,
struct security_descriptor **ppdesc)