From 98fda45351590fb336f8c0003862d192b9974dce Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 7 Apr 2007 00:57:26 +0000 Subject: r22116: Only query by SID if we have a SID Andrew Bartlett (This used to be commit 018939a8fd224f5aa404f08ec94ac49a7b43d7ec) --- source4/torture/rpc/lsa.c | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'source4/torture/rpc/lsa.c') 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; @@ -1562,30 +1585,6 @@ 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; - } - } - for (j=0; j < ARRAY_SIZE(levels); j++) { struct lsa_QueryTrustedDomainInfoByName q; union lsa_TrustedDomainInfo info; -- cgit