summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-07-09 13:56:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:58 -0500
commit56bb8f40623be28f385ff5bb8d39ab0a4f657de5 (patch)
treede4b2bfbb450de75119ca4d7c48990813b2d0f16 /source4
parent82f1374d2b6923e0e42e35aa5095cc4855848263 (diff)
downloadsamba-56bb8f40623be28f385ff5bb8d39ab0a4f657de5.tar.gz
samba-56bb8f40623be28f385ff5bb8d39ab0a4f657de5.tar.bz2
samba-56bb8f40623be28f385ff5bb8d39ab0a4f657de5.zip
r16900: Nicer display of the test results.
rafal (This used to be commit bb0e9297b2d0b25866b31937b553434a2dc6aac4)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/libnet/libnet_lookup.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index c8e25817fc..ac2f19b983 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -24,6 +24,7 @@
#include "libnet/libnet.h"
#include "librpc/gen_ndr/nbt.h"
#include "librpc/rpc/dcerpc.h"
+#include "libcli/libcli.h"
#include "torture/torture.h"
@@ -36,7 +37,6 @@ BOOL torture_lookup(struct torture_context *torture)
struct libnet_Lookup lookup;
struct dcerpc_binding *bind;
const char *bindstr;
- const char *address;
mem_ctx = talloc_init("test_lookup");
@@ -126,6 +126,7 @@ BOOL torture_lookup_pdc(struct torture_context *torture)
TALLOC_CTX *mem_ctx;
struct libnet_context *ctx;
struct libnet_LookupDCs *lookup;
+ int i;
mem_ctx = talloc_init("test_lookup_pdc");
@@ -146,13 +147,20 @@ BOOL torture_lookup_pdc(struct torture_context *torture)
status = libnet_LookupDCs(ctx, mem_ctx, lookup);
if (!NT_STATUS_IS_OK(status)) {
- printf("Couldn't lookup pdc %s: %s\n", lookup->in.domain_name, nt_errstr(status));
+ printf("Couldn't lookup pdc %s: %s\n", lookup->in.domain_name,
+ nt_errstr(status));
ret = False;
goto done;
}
ret = True;
+ printf("DCs of domain [%s] found.\n", lookup->in.domain_name);
+ for (i = 0; i < lookup->out.num_dcs; i++) {
+ printf("\tDC[%d]: name=%s, address=%s\n", i, lookup->out.dcs[i].name,
+ lookup->out.dcs[i].address);
+ }
+
done:
talloc_free(mem_ctx);
return ret;