summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-10-09 12:45:30 -0700
committerJeremy Allison <jra@samba.org>2012-10-09 12:45:30 -0700
commit5afabdc976d5ba1fd21dcdede85657b618fb6b76 (patch)
tree9ed049d66a123da206b54ba580b21195edce2e2b /source3
parentf88ab17993e22a9c368017d54da437c057e371ca (diff)
downloadsamba-5afabdc976d5ba1fd21dcdede85657b618fb6b76.tar.gz
samba-5afabdc976d5ba1fd21dcdede85657b618fb6b76.tar.bz2
samba-5afabdc976d5ba1fd21dcdede85657b618fb6b76.zip
Move setting of psd->dacl->revision and protect against null SD's.
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srvsvc/srv_srvsvc_nt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 2d34b9b4d1..1d976e1e87 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2197,6 +2197,10 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
goto error_exit;
}
+ if (psd && psd->dacl) {
+ psd->dacl->revision = NT4_ACL_REVISION;
+ }
+
sd_size = ndr_size_security_descriptor(psd, 0);
sd_buf = talloc_zero(p->mem_ctx, struct sec_desc_buf);
@@ -2210,8 +2214,6 @@ WERROR _srvsvc_NetGetFileSecurity(struct pipes_struct *p,
*r->out.sd_buf = sd_buf;
- psd->dacl->revision = NT4_ACL_REVISION;
-
close_file(NULL, fsp, NORMAL_CLOSE);
vfs_ChDir(conn, oldcwd);
SMB_VFS_DISCONNECT(conn);