summaryrefslogtreecommitdiff
path: root/source3/utils/smbcacls.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/smbcacls.c')
-rw-r--r--source3/utils/smbcacls.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index f40789b666..b12bf4d35d 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -657,6 +657,14 @@ static int cacl_set(struct cli_state *cli, char *filename,
}
}
+ if (sd->owner_sid) {
+ old->owner_sid = sd->owner_sid;
+ }
+
+ if (sd->grp_sid) {
+ old->grp_sid = sd->grp_sid;
+ }
+
break;
case SMB_ACL_ADD:
@@ -674,7 +682,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
sort_acl(old->dacl);
/* Create new security descriptor and set it */
- sd = make_sec_desc(ctx,old->revision, old->type, NULL, NULL,
+ sd = make_sec_desc(ctx,old->revision, old->type, old->owner_sid, old->grp_sid,
NULL, old->dacl, &sd_size);
fnum = cli_nt_create(cli, filename, WRITE_DAC_ACCESS);