From 15953b82eb3b49d736b4b835b1d0d3cf0da0bff8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 Oct 2007 21:06:49 +0200 Subject: Make [f]get_nt_acl return NTSTATUS (This used to be commit dcbe1bf942d017a3cd5084c6ef605a13912f795b) --- source3/modules/vfs_afsacl.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source3/modules/vfs_afsacl.c') diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index a1043d6f6a..eac70f4f20 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -829,8 +829,8 @@ static bool afs_get_afs_acl(char *filename, struct afs_acl *acl) return True; } -static size_t afs_get_nt_acl(struct files_struct *fsp, uint32 security_info, - struct security_descriptor **ppdesc) +static NTSTATUS afs_get_nt_acl(struct files_struct *fsp, uint32 security_info, + struct security_descriptor **ppdesc) { struct afs_acl acl; size_t sd_size; @@ -840,14 +840,14 @@ static size_t afs_get_nt_acl(struct files_struct *fsp, uint32 security_info, sidpts = lp_parm_bool(SNUM(fsp->conn), "afsacl", "sidpts", False); if (!afs_get_afs_acl(fsp->fsp_name, &acl)) { - return 0; + return NT_STATUS_ACCESS_DENIED; } sd_size = afs_to_nt_acl(&acl, fsp, security_info, ppdesc); free_afs_acl(&acl); - return sd_size; + return (sd_size != 0) ? NT_STATUS_OK : NT_STATUS_ACCESS_DENIED; } /* For setting an AFS ACL we have to take care of the ACEs we could @@ -982,17 +982,17 @@ static NTSTATUS afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp, return (ret == 0) ? NT_STATUS_OK : NT_STATUS_ACCESS_DENIED; } -static size_t afsacl_fget_nt_acl(struct vfs_handle_struct *handle, - struct files_struct *fsp, - int fd, uint32 security_info, - struct security_descriptor **ppdesc) +static NTSTATUS afsacl_fget_nt_acl(struct vfs_handle_struct *handle, + struct files_struct *fsp, + int fd, uint32 security_info, + struct security_descriptor **ppdesc) { return afs_get_nt_acl(fsp, security_info, ppdesc); } -static size_t afsacl_get_nt_acl(struct vfs_handle_struct *handle, - struct files_struct *fsp, - const char *name, uint32 security_info, - struct security_descriptor **ppdesc) +static NTSTATUS afsacl_get_nt_acl(struct vfs_handle_struct *handle, + struct files_struct *fsp, + const char *name, uint32 security_info, + struct security_descriptor **ppdesc) { return afs_get_nt_acl(fsp, security_info, ppdesc); } -- cgit