mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r3918: Allow to set OWNER- and GROUP-entries while setting security descriptors
with smbcacls and using with the -S or -M switch. Fixes #404 and #2076. Guenther
This commit is contained in:
parent
1680446ce2
commit
13d32519e3
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user