summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/lsa.c47
1 files changed, 23 insertions, 24 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 36080a25e1..1c2a9fd41d 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1521,6 +1521,29 @@ static BOOL test_query_each_TrustDom(struct dcerpc_pipe *p,
return False;
}
+ for (j=0; j < ARRAY_SIZE(levels); j++) {
+ struct lsa_QueryTrustedDomainInfoBySid q;
+ union lsa_TrustedDomainInfo info;
+
+ if (!domains->domains[i].sid) {
+ continue;
+ }
+
+ q.in.handle = handle;
+ q.in.dom_sid = domains->domains[i].sid;
+ q.in.level = levels[j];
+ q.out.info = &info;
+ status = dcerpc_lsa_QueryTrustedDomainInfoBySid(p, mem_ctx, &q);
+ if (!NT_STATUS_IS_OK(status) && ok[j]) {
+ printf("QueryTrustedDomainInfoBySid level %d failed - %s\n",
+ levels[j], nt_errstr(status));
+ ret = False;
+ } else if (NT_STATUS_IS_OK(status) && !ok[j]) {
+ printf("QueryTrustedDomainInfoBySid level %d unexpectedly succeeded - %s\n",
+ levels[j], nt_errstr(status));
+ ret = False;
+ }
+ }
}
trust_by_name.in.handle = handle;
@@ -1563,30 +1586,6 @@ static BOOL test_query_each_TrustDom(struct dcerpc_pipe *p,
}
for (j=0; j < ARRAY_SIZE(levels); j++) {
- struct lsa_QueryTrustedDomainInfoBySid q;
- union lsa_TrustedDomainInfo info;
-
- if (!domains->domains[i].sid) {
- continue;
- }
-
- q.in.handle = handle;
- q.in.dom_sid = domains->domains[i].sid;
- q.in.level = levels[j];
- q.out.info = &info;
- status = dcerpc_lsa_QueryTrustedDomainInfoBySid(p, mem_ctx, &q);
- if (!NT_STATUS_IS_OK(status) && ok[j]) {
- printf("QueryTrustedDomainInfoBySid level %d failed - %s\n",
- levels[j], nt_errstr(status));
- ret = False;
- } else if (NT_STATUS_IS_OK(status) && !ok[j]) {
- printf("QueryTrustedDomainInfoBySid level %d unexpectedly succeeded - %s\n",
- levels[j], nt_errstr(status));
- ret = False;
- }
- }
-
- for (j=0; j < ARRAY_SIZE(levels); j++) {
struct lsa_QueryTrustedDomainInfoByName q;
union lsa_TrustedDomainInfo info;
q.in.handle = handle;