summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-05-13 15:14:20 +0200
committerGünther Deschner <gd@samba.org>2009-05-13 15:19:40 +0200
commit675e52cde78906a63fe96e6d34aab92eb710c6b2 (patch)
treeff6b340e81d2ac057b9d5204078d7e7633bbefb2
parent2abdfab613b9487138612bf4ad0422ce4771d7cc (diff)
downloadsamba-675e52cde78906a63fe96e6d34aab92eb710c6b2.tar.gz
samba-675e52cde78906a63fe96e6d34aab92eb710c6b2.tar.bz2
samba-675e52cde78906a63fe96e6d34aab92eb710c6b2.zip
s4-smbtorture: split RPC-SAMR-ACCESSMASK into several tests.
Guenther
-rw-r--r--source4/torture/rpc/samr_accessmask.c58
1 files changed, 24 insertions, 34 deletions
diff --git a/source4/torture/rpc/samr_accessmask.c b/source4/torture/rpc/samr_accessmask.c
index 7b39d2b9fb..1e74455849 100644
--- a/source4/torture/rpc/samr_accessmask.c
+++ b/source4/torture/rpc/samr_accessmask.c
@@ -588,6 +588,10 @@ static bool test_samr_connect(struct torture_context *tctx,
bool ret = true;
const struct dom_sid *test_sid;
+ if (torture_setting_bool(tctx, "samba3", false)) {
+ torture_skip(tctx, "Skipping test against Samba 3");
+ }
+
/* create a test user */
testuser = torture_create_testuser(tctx, TEST_USER_NAME, lp_workgroup(tctx->lp_ctx),
ACB_NORMAL, &testuser_passwd);
@@ -604,38 +608,6 @@ static bool test_samr_connect(struct torture_context *tctx,
test_sid = torture_join_user_sid(testuser);
- /* test which bits in the accessmask to Connect5
- will allow us to connect to the server
- */
- if (!test_samr_accessmask_Connect5(tctx, p)) {
- ret = false;
- }
-
-
- /* test which bits in the accessmask to Connect5 will allow
- * us to call EnumDomains()
- */
- if (!test_samr_accessmask_EnumDomains(tctx, p)) {
- ret = false;
- }
-
- /* test which bits in the accessmask to Connect5 will allow
- * us to call LookupDomain()
- */
- if (!test_samr_accessmask_LookupDomain(tctx, p)) {
- ret = false;
- }
-
-
- /* test which bits in the accessmask to Connect5 will allow
- * us to call OpenDomain()
- */
- if (!test_samr_accessmask_OpenDomain(tctx, p)) {
- ret = false;
- }
-
- if (!torture_setting_bool(tctx, "samba3", false)) {
-
/* test if ACLs can be changed for the policy handle
* returned by Connect5
*/
@@ -657,8 +629,6 @@ static bool test_samr_connect(struct torture_context *tctx,
ret = false;
}
- }
-
/* remove the test user */
torture_leave_domain(tctx, testuser);
@@ -675,5 +645,25 @@ struct torture_suite *torture_rpc_samr_accessmask(TALLOC_CTX *mem_ctx)
torture_rpc_tcase_add_test(tcase, "CONNECT", test_samr_connect);
+ /* test which bits in the accessmask to Connect5 will allow
+ * us to call OpenDomain() */
+ torture_rpc_tcase_add_test(tcase, "OpenDomain",
+ test_samr_accessmask_OpenDomain);
+
+ /* test which bits in the accessmask to Connect5 will allow
+ * us to call LookupDomain() */
+ torture_rpc_tcase_add_test(tcase, "LookupDomain",
+ test_samr_accessmask_LookupDomain);
+
+ /* test which bits in the accessmask to Connect5 will allow
+ * us to call EnumDomains() */
+ torture_rpc_tcase_add_test(tcase, "EnumDomains",
+ test_samr_accessmask_EnumDomains);
+
+ /* test which bits in the accessmask to Connect5
+ will allow us to connect to the server */
+ torture_rpc_tcase_add_test(tcase, "Connect5",
+ test_samr_accessmask_Connect5);
+
return suite;
}