summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/rpc/lsa.c29
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");