From e1e0645d18490c0e10e03bfde4396388c5e9b297 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Sun, 27 Aug 2006 20:39:50 +0000 Subject: r17857: A couple of new tests. rafal (This used to be commit 6db488cc6e29704ae2ae17b2875a76ded5d86b88) --- source4/torture/libnet/libnet_lookup.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source4/torture/libnet/libnet_lookup.c') 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; +} -- cgit