summaryrefslogtreecommitdiff
path: root/source/utils/smbcacls.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-09-19 21:57:43 +0000
committerJeremy Allison <jra@samba.org>2003-09-19 21:57:43 +0000
commit28b315a7501f42928d73efaa75f74146ba95cf2d (patch)
tree1037238ab9b6e77f364b060b5c8859519d49d489 /source/utils/smbcacls.c
parent64fa24dbabd8d211d276e19745561a11b7465158 (diff)
downloadsamba-28b315a7501f42928d73efaa75f74146ba95cf2d.tar.gz
Ensure that dup_sec_desc copies the 'type' field correctly. This caused
me to expose a type arguement to make_sec_desc(). We weren't copying the SE_DESC_DACL_AUTO_INHERITED flag which could cause errors on auto inherited checks. Jeremy.
Diffstat (limited to 'source/utils/smbcacls.c')
-rw-r--r--source/utils/smbcacls.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c
index 58ee57b5dd2..5a70d168842 100644
--- a/source/utils/smbcacls.c
+++ b/source/utils/smbcacls.c
@@ -389,7 +389,7 @@ static SEC_DESC *sec_desc_parse(char *str)
return NULL;
}
- ret = make_sec_desc(ctx,revision, owner_sid, grp_sid,
+ ret = make_sec_desc(ctx,revision, SEC_DESC_SELF_RELATIVE, owner_sid, grp_sid,
NULL, dacl, &sd_size);
SAFE_FREE(grp_sid);
@@ -504,7 +504,7 @@ static int owner_set(struct cli_state *cli, enum chown_mode change_mode,
return EXIT_FAILED;
}
- sd = make_sec_desc(ctx,old->revision,
+ sd = make_sec_desc(ctx,old->revision, old->type,
(change_mode == REQUEST_CHOWN) ? &sid : NULL,
(change_mode == REQUEST_CHGRP) ? &sid : NULL,
NULL, NULL, &sd_size);
@@ -679,7 +679,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, NULL, NULL,
+ sd = make_sec_desc(ctx,old->revision, old->type, NULL, NULL,
NULL, old->dacl, &sd_size);
fnum = cli_nt_create(cli, filename, WRITE_DAC_ACCESS);