summaryrefslogtreecommitdiff
path: root/source4/torture/libnet/libnet_lookup.c
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-08-27 20:39:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:49 -0500
commite1e0645d18490c0e10e03bfde4396388c5e9b297 (patch)
treeda80d3a7639c3c003466e13bc5e3239a684d535a /source4/torture/libnet/libnet_lookup.c
parent1e46d3a46a2556eb3c8704d344f51a013059ba97 (diff)
downloadsamba-e1e0645d18490c0e10e03bfde4396388c5e9b297.tar.gz
samba-e1e0645d18490c0e10e03bfde4396388c5e9b297.tar.bz2
samba-e1e0645d18490c0e10e03bfde4396388c5e9b297.zip
r17857: A couple of new tests.
rafal (This used to be commit 6db488cc6e29704ae2ae17b2875a76ded5d86b88)
Diffstat (limited to 'source4/torture/libnet/libnet_lookup.c')
-rw-r--r--source4/torture/libnet/libnet_lookup.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c
index ac2f19b983..eb03eb5eca 100644
--- a/source4/torture/libnet/libnet_lookup.c
+++ b/source4/torture/libnet/libnet_lookup.c
@@ -165,3 +165,28 @@ done:
talloc_free(mem_ctx);
return ret;
}
+
+
+BOOL torture_lookup_sam_name(struct torture_context *torture)
+{
+ NTSTATUS status;
+ TALLOC_CTX *mem_ctx;
+ struct libnet_context *ctx;
+ struct libnet_LookupName r;
+
+ ctx = libnet_context_init(NULL);
+ ctx->cred = cmdline_credentials;
+
+ mem_ctx = talloc_init("torture lookup sam name");
+ if (mem_ctx == NULL) return False;
+
+ r.in.name = "Administrator";
+ r.in.domain_name = lp_workgroup();
+
+ status = libnet_LookupName(ctx, mem_ctx, &r);
+
+ talloc_free(mem_ctx);
+ talloc_free(ctx);
+
+ return True;
+}