summaryrefslogtreecommitdiff
path: root/source3/rpc_server
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/rpc_server
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/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 55c30c5315..5a3c451cde 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2050,14 +2050,19 @@ WERROR _srv_net_file_query_secdesc(pipes_struct *p, SRV_Q_NET_FILE_QUERY_SECDESC
goto error_exit;
}
- sd_size = SMB_VFS_GET_NT_ACL(fsp, fsp->fsp_name, (OWNER_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|DACL_SECURITY_INFORMATION), &psd);
+ nt_status = SMB_VFS_GET_NT_ACL(fsp, fsp->fsp_name,
+ (OWNER_SECURITY_INFORMATION
+ |GROUP_SECURITY_INFORMATION
+ |DACL_SECURITY_INFORMATION), &psd);
- if (sd_size == 0) {
+ if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(3,("_srv_net_file_query_secdesc: Unable to get NT ACL for file %s\n", filename));
- r_u->status = WERR_ACCESS_DENIED;
+ r_u->status = ntstatus_to_werror(nt_status);
goto error_exit;
}
+ sd_size = sec_desc_size(psd);
+
r_u->ptr_response = 1;
r_u->size_response = sd_size;
r_u->ptr_secdesc = 1;