summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-03 06:25:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:06:18 -0500
commit7dcfd94f817d1c12a14704cbb96604dc3074aa2e (patch)
tree9af4cf2d1505da46c43ca7515312591e846e45c0 /source4/torture
parent58c326809a816703dc516c3022c9c4dbb9d09445 (diff)
downloadsamba-7dcfd94f817d1c12a14704cbb96604dc3074aa2e.tar.gz
samba-7dcfd94f817d1c12a14704cbb96604dc3074aa2e.tar.bz2
samba-7dcfd94f817d1c12a14704cbb96604dc3074aa2e.zip
r4053: expanded and fixed a bug in the RAW-ACLS test
(This used to be commit 0d19b4a09f4ce0b0c5e7779809c383322f4de4fc)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/acls.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c
index 24f18e6cce..bee1c70e12 100644
--- a/source4/torture/raw/acls.c
+++ b/source4/torture/raw/acls.c
@@ -333,6 +333,17 @@ static BOOL test_creator_sid(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_setfileinfo(cli->tree, &set);
CHECK_STATUS(status, NT_STATUS_OK);
+ printf("check that sd has been mapped correctly\n");
+ status = smb_raw_fileinfo(cli->tree, mem_ctx, &q);
+ CHECK_STATUS(status, NT_STATUS_OK);
+ if (!security_descriptor_equal(q.query_secdesc.out.sd, sd)) {
+ printf("security descriptors don't match!\n");
+ printf("got:\n");
+ NDR_PRINT_DEBUG(security_descriptor, q.query_secdesc.out.sd);
+ printf("expected:\n");
+ NDR_PRINT_DEBUG(security_descriptor, sd);
+ }
+
printf("try open for write\n");
io.ntcreatex.in.access_mask = SEC_FILE_WRITE_DATA;
status = smb_raw_open(cli->tree, mem_ctx, &io);
@@ -449,11 +460,13 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
uint32_t gen_bits;
uint32_t specific_bits;
} file_mappings[] = {
- { 0, 0 },
- { SEC_GENERIC_READ, SEC_RIGHTS_FILE_READ },
- { SEC_GENERIC_WRITE, SEC_RIGHTS_FILE_WRITE },
- { SEC_GENERIC_EXECUTE, SEC_RIGHTS_FILE_EXECUTE },
- { SEC_GENERIC_ALL, SEC_RIGHTS_FILE_ALL }
+ { 0, 0 },
+ { SEC_GENERIC_READ, SEC_RIGHTS_FILE_READ },
+ { SEC_GENERIC_WRITE, SEC_RIGHTS_FILE_WRITE },
+ { SEC_GENERIC_EXECUTE, SEC_RIGHTS_FILE_EXECUTE },
+ { SEC_GENERIC_ALL, SEC_RIGHTS_FILE_ALL },
+ { SEC_FILE_READ_DATA, SEC_FILE_READ_DATA },
+ { SEC_FILE_READ_ATTRIBUTE, SEC_FILE_READ_ATTRIBUTE }
};
const struct {
uint32_t gen_bits;
@@ -586,7 +599,7 @@ static BOOL test_generic_bits(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
owner_sid = dom_sid_string(mem_ctx, sd_orig->owner_sid);
- for (i=0;i<ARRAY_SIZE(file_mappings);i++) {
+ for (i=0;i<ARRAY_SIZE(dir_mappings);i++) {
printf("testing generic bits 0x%08x\n",
file_mappings[i].gen_bits);