summaryrefslogtreecommitdiffstats
path: root/source/utils/smbcacls.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-07-09 22:15:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:21 -0500
commit44e22581d731572d3fa260b92063922c59ce75db (patch)
tree7c69d799b9f34f13323591b1cc95498dc66c5cd8 /source/utils/smbcacls.c
parentc2f7ab1c175ecff0cf44d0bbc4763ba9f7d7803f (diff)
downloadsamba-44e22581d731572d3fa260b92063922c59ce75db.tar.gz
samba-44e22581d731572d3fa260b92063922c59ce75db.tar.xz
samba-44e22581d731572d3fa260b92063922c59ce75db.zip
r23782: I tested this against NT4 PDC, W2K Server, W2K3 Dc, and a Win XP std alone
client and they all work with this code.
Diffstat (limited to 'source/utils/smbcacls.c')
-rw-r--r--source/utils/smbcacls.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/utils/smbcacls.c b/source/utils/smbcacls.c
index e4ab4e9283a..3bcf9885bcf 100644
--- a/source/utils/smbcacls.c
+++ b/source/utils/smbcacls.c
@@ -730,7 +730,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
sort_acl(old->dacl);
/* Create new security descriptor and set it */
-#if 0
+
/* We used to just have "WRITE_DAC_ACCESS" without WRITE_OWNER.
But if we're sending an owner, even if it's the same as the one
that already exists then W2K3 insists we open with WRITE_OWNER access.
@@ -742,12 +742,7 @@ static int cacl_set(struct cli_state *cli, char *filename,
NULL, old->dacl, &sd_size);
fnum = cli_nt_create(cli, filename, WRITE_DAC_ACCESS|WRITE_OWNER_ACCESS);
-#else
- 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);
-#endif
if (fnum == -1) {
printf("cacl_set failed to open %s: %s\n", filename, cli_errstr(cli));
return EXIT_FAILED;