diff options
author | Jeremy Allison <jra@samba.org> | 2012-08-29 13:37:51 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-08-30 10:08:50 -0700 |
commit | 795920cf4a25ab4ea061d5620b19ba27884921dd (patch) | |
tree | bd3cae21966be1778b903fc98475e98ee5a3bcaa /source3 | |
parent | 70ebf1da67e30b585543ffe55a6d7c9da6023138 (diff) | |
download | samba-795920cf4a25ab4ea061d5620b19ba27884921dd.tar.gz samba-795920cf4a25ab4ea061d5620b19ba27884921dd.tar.bz2 samba-795920cf4a25ab4ea061d5620b19ba27884921dd.zip |
Change the other two places where we set a security descriptor given by the client to got through set_sd(),
the canonicalize sd function.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 21 | ||||
-rw-r--r-- | source3/smbd/open.c | 6 |
2 files changed, 2 insertions, 25 deletions
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index 7f34ec28e0..2d34b9b4d1 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -2332,26 +2332,7 @@ WERROR _srvsvc_NetSetFileSecurity(struct pipes_struct *p, psd = r->in.sd_buf->sd; security_info_sent = r->in.securityinformation; - if (psd->owner_sid==0) { - security_info_sent &= ~SECINFO_OWNER; - } - if (psd->group_sid==0) { - security_info_sent &= ~SECINFO_GROUP; - } - if (psd->sacl==0) { - security_info_sent &= ~SECINFO_SACL; - } - if (psd->dacl==0) { - security_info_sent &= ~SECINFO_DACL; - } - - /* Convert all the generic bits. */ - security_acl_map_generic(psd->dacl, &file_generic_mapping); - security_acl_map_generic(psd->sacl, &file_generic_mapping); - - nt_status = SMB_VFS_FSET_NT_ACL(fsp, - security_info_sent, - psd); + nt_status = set_sd(fsp, psd, security_info_sent); if (!NT_STATUS_IS_OK(nt_status) ) { DEBUG(3,("_srvsvc_NetSetFileSecurity: Unable to set NT ACL " diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d078638aae..415f6adf2e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3757,15 +3757,11 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, fsp->access_mask = FILE_GENERIC_ALL; - /* Convert all the generic bits. */ - security_acl_map_generic(sd->dacl, &file_generic_mapping); - security_acl_map_generic(sd->sacl, &file_generic_mapping); - if (sec_info_sent & (SECINFO_OWNER| SECINFO_GROUP| SECINFO_DACL| SECINFO_SACL)) { - status = SMB_VFS_FSET_NT_ACL(fsp, sec_info_sent, sd); + status = set_sd(fsp, sd, sec_info_sent); } fsp->access_mask = saved_access_mask; |