diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source4/torture/raw/acls.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.gz samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.tar.bz2 samba-6da26870e0ae5acd6ff49a30ec2f6886b44d095e.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16
Diffstat (limited to 'source4/torture/raw/acls.c')
-rw-r--r-- | source4/torture/raw/acls.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c index 666d164c96..01ee8be6a9 100644 --- a/source4/torture/raw/acls.c +++ b/source4/torture/raw/acls.c @@ -1846,6 +1846,7 @@ done: return ret; } +#if 0 static bool test_inheritance_flags(struct torture_context *tctx, struct smbcli_state *cli) { @@ -2073,6 +2074,7 @@ done: smbcli_deltree(cli->tree, BASEDIR); return ret; } +#endif /* test dynamic acl inheritance @@ -2201,13 +2203,14 @@ static bool test_inheritance_dynamic(struct torture_context *tctx, smbcli_unlink(cli->tree, fname1); done: - torture_comment(tctx, "put back original sd\n"); - set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC; - set.set_secdesc.in.file.fnum = fnum; - set.set_secdesc.in.secinfo_flags = SECINFO_DACL; - set.set_secdesc.in.sd = sd_orig; - status = smb_raw_setfileinfo(cli->tree, &set); - + if (sd_orig != NULL) { + torture_comment(tctx, "put back original sd\n"); + set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC; + set.set_secdesc.in.file.fnum = fnum; + set.set_secdesc.in.secinfo_flags = SECINFO_DACL; + set.set_secdesc.in.sd = sd_orig; + status = smb_raw_setfileinfo(cli->tree, &set); + } smbcli_close(cli->tree, fnum); smbcli_rmdir(cli->tree, dname); smb_raw_exit(cli->session); @@ -2244,6 +2247,8 @@ done: CHECK_STATUS_FOR_BIT_ACTION(status, bits, do {} while (0)); \ } while (0) +#if 0 + /* test what access mask is needed for getting and setting security_descriptors Test copied to smb2/acls.c for SMB2. */ static bool test_sd_get_set(struct torture_context *tctx, @@ -2433,6 +2438,7 @@ done: return ret; } +#endif /* basic testing of security descriptor calls @@ -2450,11 +2456,14 @@ struct torture_suite *torture_raw_acls(TALLOC_CTX *mem_ctx) torture_suite_add_1smb_test(suite, "owner", test_owner_bits); torture_suite_add_1smb_test(suite, "inheritance", test_inheritance); - /* torture_suite_add_1smb_test(suite, "INHERITFLAGS", test_inheritance_flags); */ +#if 0 + torture_suite_add_1smb_test(suite, "INHERITFLAGS", test_inheritance_flags); +#endif torture_suite_add_1smb_test(suite, "dynamic", test_inheritance_dynamic); - /* XXX This test does not work against XP or Vista. +#if 0 + /* XXX This test does not work against XP or Vista. */ torture_suite_add_1smb_test(suite, "GETSET", test_sd_get_set); - */ +#endif return suite; } |