summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-07-31 09:07:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-07-31 09:07:57 +1000
commit2afd7d6d66c4ee16ffad5f1a9d5ba6ef4530ca99 (patch)
treedfaef3bbf7e1d44ac4617acde36690db4e1e4d4a /source4
parent337752cfd82dc3dbdf918fd45eddd1aa8fb04576 (diff)
downloadsamba-2afd7d6d66c4ee16ffad5f1a9d5ba6ef4530ca99.tar.gz
samba-2afd7d6d66c4ee16ffad5f1a9d5ba6ef4530ca99.tar.bz2
samba-2afd7d6d66c4ee16ffad5f1a9d5ba6ef4530ca99.zip
Don't fail if the domain has a trust already.
Andrew Bartlett (This used to be commit c2df7ffa6d67dd9381d10397c679746547cd5e17)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/lsa.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index e6102f0a82..4fb459ea25 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -1830,7 +1830,12 @@ static bool test_EnumTrustDom(struct dcerpc_pipe *p,
enum_status = dcerpc_lsa_EnumTrustDom(p, mem_ctx, &r);
- if (!(NT_STATUS_EQUAL(enum_status, STATUS_MORE_ENTRIES) || NT_STATUS_EQUAL(enum_status, NT_STATUS_NO_MORE_ENTRIES))) {
+ if (NT_STATUS_IS_OK(enum_status)) {
+ if (domains.count == 0) {
+ printf("EnumTrustDom failed - should have returned 'NT_STATUS_NO_MORE_ENTRIES' for 0 trusted domains\n");
+ return false;
+ }
+ } else if (!(NT_STATUS_EQUAL(enum_status, STATUS_MORE_ENTRIES) || NT_STATUS_EQUAL(enum_status, NT_STATUS_NO_MORE_ENTRIES))) {
printf("EnumTrustDom of zero size failed - %s\n", nt_errstr(enum_status));
return false;
}