svn commit: samba r22116 - in
branches/SAMBA_4_0/source/torture/rpc: .
abartlet at samba.org
abartlet at samba.org
Sat Apr 7 00:57:29 GMT 2007
Author: abartlet
Date: 2007-04-07 00:57:26 +0000 (Sat, 07 Apr 2007)
New Revision: 22116
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22116
Log:
Only query by SID if we have a SID
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/torture/rpc/lsa.c
Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/lsa.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/lsa.c 2007-04-07 00:47:39 UTC (rev 22115)
+++ branches/SAMBA_4_0/source/torture/rpc/lsa.c 2007-04-07 00:57:26 UTC (rev 22116)
@@ -1521,6 +1521,29 @@
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 @@
}
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;
More information about the samba-cvs
mailing list