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 | dcbe1bf942d017a3cd5084c6ef605a13912f795b (patch) | |
tree | 6a4fff01001e4cf6be8ca18a12cd030248030ceb /source/smbd/file_access.c | |
parent | 01663c2312467ceebeb2e2fb1aa432ad96c626e5 (diff) | |
download | samba-dcbe1bf942d017a3cd5084c6ef605a13912f795b.tar.gz samba-dcbe1bf942d017a3cd5084c6ef605a13912f795b.tar.xz samba-dcbe1bf942d017a3cd5084c6ef605a13912f795b.zip |
Make [f]get_nt_acl return NTSTATUS
Diffstat (limited to 'source/smbd/file_access.c')
-rw-r--r-- | source/smbd/file_access.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/smbd/file_access.c b/source/smbd/file_access.c index 121e7f79a9b..46472665e5f 100644 --- a/source/smbd/file_access.c +++ b/source/smbd/file_access.c @@ -41,7 +41,6 @@ static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx, NTSTATUS status; struct files_struct *fsp = NULL; struct security_descriptor *secdesc = NULL; - size_t secdesc_size; if (!VALID_STAT(*psbuf)) { if (SMB_VFS_STAT(conn, fname, psbuf) != 0) { @@ -70,14 +69,14 @@ static NTSTATUS conn_get_nt_acl(TALLOC_CTX *mem_ctx, return status; } - secdesc_size = SMB_VFS_GET_NT_ACL(fsp, fname, - (OWNER_SECURITY_INFORMATION | - GROUP_SECURITY_INFORMATION | - DACL_SECURITY_INFORMATION), - &secdesc); - if (secdesc_size == 0) { + status = SMB_VFS_GET_NT_ACL(fsp, fname, + (OWNER_SECURITY_INFORMATION | + GROUP_SECURITY_INFORMATION | + DACL_SECURITY_INFORMATION), + &secdesc); + if (!NT_STATUS_IS_OK(status)) { DEBUG(5, ("Unable to get NT ACL for file %s\n", fname)); - return NT_STATUS_ACCESS_DENIED; + return status; } *psd = talloc_move(mem_ctx, &secdesc); |