diff options
author | Volker Lendecke <vl@sernet.de> | 2007-10-13 21:06:49 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2007-11-13 15:47:01 +0100 |
commit | 15953b82eb3b49d736b4b835b1d0d3cf0da0bff8 (patch) | |
tree | 4b3d872f0e8747386fb21fc1a893c0558aa2fc75 /source3/modules/vfs_afsacl.c | |
parent | 9441d1ba87313e0ecc6e6971a25e7ad0c280fdd7 (diff) | |
download | samba-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_afsacl.c')
-rw-r--r-- | source3/modules/vfs_afsacl.c | 24 |
1 files changed, 12 insertions, 12 deletions
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); } |