summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-06 09:24:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:27 -0500
commit7e5523cbe468283d57521e73332ec2561a93d42a (patch)
tree0764c4b8a72df360b9ea2f6867cc76dc1d8c0b97 /source4/torture
parentd62a44c447c2754948448ae618c75d29a6b8d89e (diff)
downloadsamba-7e5523cbe468283d57521e73332ec2561a93d42a.tar.gz
samba-7e5523cbe468283d57521e73332ec2561a93d42a.tar.bz2
samba-7e5523cbe468283d57521e73332ec2561a93d42a.zip
r4559: prevent the RPC-EPMAPPER test from looping forever against w2k3
(This used to be commit fa3cecddd8065885dd461000de683eb0143eb481)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/epmapper.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 68a6f6ba62..b649c6d377 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -225,8 +225,6 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
struct rpc_if_id_t iface;
struct policy_handle handle;
- ZERO_STRUCT(uuid);
- ZERO_STRUCT(iface);
ZERO_STRUCT(handle);
r.in.inquiry_type = 0;
@@ -239,10 +237,18 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
do {
int i;
+
+ ZERO_STRUCT(uuid);
+ ZERO_STRUCT(iface);
+
status = dcerpc_epm_Lookup(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status) || r.out.result != 0) {
break;
}
+
+ printf("epm_Lookup returned %d events GUID %s\n",
+ r.out.num_ents, GUID_string(mem_ctx, &handle.uuid));
+
for (i=0;i<r.out.num_ents;i++) {
printf("\nFound '%s'\n", r.out.entries[i].annotation);
display_tower(mem_ctx, &r.out.entries[i].tower->tower);
@@ -252,7 +258,8 @@ static BOOL test_Lookup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
}
} while (NT_STATUS_IS_OK(status) &&
r.out.result == 0 &&
- r.out.num_ents == r.in.max_ents);
+ r.out.num_ents == r.in.max_ents &&
+ !policy_handle_empty(&handle));
if (!NT_STATUS_IS_OK(status)) {
printf("Lookup failed - %s\n", nt_errstr(status));
@@ -307,7 +314,7 @@ BOOL torture_rpc_epmapper(void)
talloc_destroy(mem_ctx);
- torture_rpc_close(p);
+ torture_rpc_close(p);
return ret;
}