1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

fixed the parsing again and got setting acls working with w2k

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent a2d07994e0
commit 374d08be64

View File

@ -145,7 +145,7 @@ static BOOL parse_ace(SEC_ACE *ace, char *str)
p = strchr(str,':'); p = strchr(str,':');
if (!p) return False; if (!p) return False;
*p = 0; *p = 0;
if (sscanf(p+1, "%x/%x/%08x", if (sscanf(p+1, "%i/%i/%i",
&atype, &aflags, &amask) != 3 || &atype, &aflags, &amask) != 3 ||
!StringToSid(&sid, str)) { !StringToSid(&sid, str)) {
return False; return False;
@ -280,7 +280,7 @@ static void cacl_dump(struct cli_state *cli, char *filename)
int fnum; int fnum;
SEC_DESC *sd; SEC_DESC *sd;
fnum = cli_nt_create(cli, filename); fnum = cli_nt_create(cli, filename, 0x20000);
if (fnum == -1) { if (fnum == -1) {
printf("Failed to open %s: %s\n", filename, cli_errstr(cli)); printf("Failed to open %s: %s\n", filename, cli_errstr(cli));
return; return;
@ -317,7 +317,7 @@ static void cacl_set(struct cli_state *cli, char *filename,
return; return;
} }
fnum = cli_nt_create(cli, filename); fnum = cli_nt_create(cli, filename, MAXIMUM_ALLOWED_ACCESS | 0x60000);
if (fnum == -1) { if (fnum == -1) {
printf("Failed to open %s: %s\n", filename, cli_errstr(cli)); printf("Failed to open %s: %s\n", filename, cli_errstr(cli));
return; return;