From: Andrew Tridgell Date: Sun, 9 Jan 2005 04:31:32 +0000 (+0000) Subject: r4612: make the output for the w2k3 acl bug a bit clearer X-Git-Url: http://git.samba.org/samba.git/?p=gd%2Fsamba%2F.git;a=commitdiff_plain;h=4e73b4b222f9977f006002b945c21fddc72a3b05 r4612: make the output for the w2k3 acl bug a bit clearer (This used to be commit 24ec8c4274241576683f1f6c86c33a2dfa43848c) --- diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c index 97f5f4f5e1f..cc99b40050a 100644 --- a/source4/torture/raw/acls.c +++ b/source4/torture/raw/acls.c @@ -1211,6 +1211,25 @@ static BOOL test_inheritance(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) CHECK_STATUS(status, NT_STATUS_OK); smbcli_close(cli->tree, fnum2); + io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; + status = smb_raw_open(cli->tree, mem_ctx, &io); + if (NT_STATUS_IS_OK(status)) { + printf("failed: w2k3 ACL bug (allowed open when ACL should deny)\n"); + ret = False; + fnum2 = io.ntcreatex.out.fnum; + smbcli_close(cli->tree, fnum2); + } else { + CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED); + } + + printf("trying without execute\n"); + io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; + io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL & ~SEC_FILE_EXECUTE; + status = smb_raw_open(cli->tree, mem_ctx, &io); + CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED); + + printf("and with full permissions again\n"); io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN; io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL; status = smb_raw_open(cli->tree, mem_ctx, &io);