summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-04-07 00:57:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:52 -0500
commit98fda45351590fb336f8c0003862d192b9974dce (patch)
tree5b06efa14b8ce2fb3759c855832c0553b0d03490 /source4/torture
parent68094302c118962ba07561eb4da7633eaec7ea0d (diff)
downloadsamba-98fda45351590fb336f8c0003862d192b9974dce.tar.gz
samba-98fda45351590fb336f8c0003862d192b9974dce.tar.bz2
samba-98fda45351590fb336f8c0003862d192b9974dce.zip
r22116: Only query by SID if we have a SID
Andrew Bartlett (This used to be commit 018939a8fd224f5aa404f08ec94ac49a7b43d7ec)
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;