diff options
author | Jeremy Allison <jra@samba.org> | 2003-05-10 02:05:24 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-05-10 02:05:24 +0000 |
commit | 45953d59f707b58e66b980512afc7f929d360ad5 (patch) | |
tree | 762d5778fd220107ee16683063538c1503c01778 | |
parent | 4cd8b276715f7e019fcee8fc3ebb2855610c4751 (diff) | |
download | samba-45953d59f707b58e66b980512afc7f929d360ad5.tar.gz samba-45953d59f707b58e66b980512afc7f929d360ad5.tar.xz samba-45953d59f707b58e66b980512afc7f929d360ad5.zip |
Fix from Tom.Lackemann@falconstor.com to correctly set the flags based
on the security entries sent.
Jeremy.
-rw-r--r-- | source/libsmb/clisecdesc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/libsmb/clisecdesc.c b/source/libsmb/clisecdesc.c index 20154dbeb29..d86a9022a69 100644 --- a/source/libsmb/clisecdesc.c +++ b/source/libsmb/clisecdesc.c @@ -79,6 +79,7 @@ BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd) char param[8]; char *rparam=NULL, *rdata=NULL; int rparam_count=0, rdata_count=0; + uint32 sec_info = 0; TALLOC_CTX *mem_ctx; prs_struct pd; BOOL ret = False; @@ -97,7 +98,14 @@ BOOL cli_set_secdesc(struct cli_state *cli, int fnum, SEC_DESC *sd) } SIVAL(param, 0, fnum); - SSVAL(param, 4, 0x7); + + if (sd->off_dacl) + sec_info |= DACL_SECURITY_INFORMATION; + if (sd->off_owner_sid) + sec_info |= OWNER_SECURITY_INFORMATION; + if (sd->off_grp_sid) + sec_info |= GROUP_SECURITY_INFORMATION; + SSVAL(param, 4, sec_info); if (!cli_send_nt_trans(cli, NT_TRANSACT_SET_SECURITY_DESC, |