From bf2746b537484a51b55a3000e4c34d08bd5aff7a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 20 Oct 2009 12:59:49 +0200 Subject: s4-smbtorture: split out EnumTrustedDomainsEx test in RPC-LSA-TRUSTED-DOMAINS. Guenther --- source4/torture/rpc/lsa.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 7b938f399c..7305a31960 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -1995,11 +1995,9 @@ static bool test_EnumTrustDom(struct dcerpc_pipe *p, struct policy_handle *handle) { struct lsa_EnumTrustDom r; - struct lsa_EnumTrustedDomainsEx r_ex; NTSTATUS enum_status; uint32_t resume_handle = 0; struct lsa_DomainList domains; - struct lsa_DomainListEx domains_ex; bool ret = true; torture_comment(tctx, "\nTesting EnumTrustDom\n"); @@ -2064,6 +2062,19 @@ static bool test_EnumTrustDom(struct dcerpc_pipe *p, } while ((NT_STATUS_EQUAL(enum_status, STATUS_MORE_ENTRIES))); + return ret; +} + +static bool test_EnumTrustDomEx(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle) +{ + struct lsa_EnumTrustedDomainsEx r_ex; + NTSTATUS enum_status; + uint32_t resume_handle = 0; + struct lsa_DomainListEx domains_ex; + bool ret = true; + torture_comment(tctx, "\nTesting EnumTrustedDomainsEx\n"); r_ex.in.handle = handle; @@ -2123,6 +2134,7 @@ static bool test_EnumTrustDom(struct dcerpc_pipe *p, return ret; } + static bool test_CreateTrustedDomain(struct dcerpc_pipe *p, struct torture_context *tctx, struct policy_handle *handle) @@ -2143,6 +2155,10 @@ static bool test_CreateTrustedDomain(struct dcerpc_pipe *p, ret = false; } + if (!test_EnumTrustDomEx(p, tctx, handle)) { + ret = false; + } + for (i=0; i< 12; i++) { char *trust_name = talloc_asprintf(tctx, "torturedom%02d", i); char *trust_sid = talloc_asprintf(tctx, "S-1-5-21-97398-379795-100%02d", i); @@ -2206,6 +2222,10 @@ static bool test_CreateTrustedDomain(struct dcerpc_pipe *p, ret = false; } + if (!test_EnumTrustDomEx(p, tctx, handle)) { + ret = false; + } + for (i=0; i<12; i++) { if (!test_DeleteTrustedDomainBySid(p, tctx, handle, domsid[i])) { ret = false; @@ -2341,6 +2361,11 @@ static bool test_CreateTrustedDomainEx2(struct dcerpc_pipe *p, ret = false; } + if (!test_EnumTrustDomEx(p, tctx, handle)) { + torture_comment(tctx, "test_EnumTrustDomEx failed\n"); + ret = false; + } + for (i=0; i<12; i++) { if (!test_DeleteTrustedDomainBySid(p, tctx, handle, domsid[i])) { torture_comment(tctx, "test_DeleteTrustedDomainBySid failed\n"); -- cgit