diff options
author | Günther Deschner <gd@samba.org> | 2009-10-20 12:59:49 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-10-20 15:30:12 +0200 |
commit | bf2746b537484a51b55a3000e4c34d08bd5aff7a (patch) | |
tree | 978484e5551ce6f8210c7e53f3256ba9edff0f32 /source4/torture/rpc | |
parent | c7023c5a3dc1644e9b8ae667f7f9d6d1dfe49bb1 (diff) | |
download | samba-bf2746b537484a51b55a3000e4c34d08bd5aff7a.tar.gz samba-bf2746b537484a51b55a3000e4c34d08bd5aff7a.tar.bz2 samba-bf2746b537484a51b55a3000e4c34d08bd5aff7a.zip |
s4-smbtorture: split out EnumTrustedDomainsEx test in RPC-LSA-TRUSTED-DOMAINS.
Guenther
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/lsa.c | 29 |
1 files changed, 27 insertions, 2 deletions
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"); |