1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

s4:torture/libnet: check the result of libnet_LookupName()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-01-14 16:38:38 +01:00 committed by Günther Deschner
parent e5ac78e8b5
commit 61a8525c8e

View File

@ -167,6 +167,7 @@ bool torture_lookup_sam_name(struct torture_context *torture)
TALLOC_CTX *mem_ctx;
struct libnet_context *ctx;
struct libnet_LookupName r;
bool ret = true;
ctx = libnet_context_init(torture->ev, torture->lp_ctx);
ctx->cred = cmdline_credentials;
@ -178,9 +179,12 @@ bool torture_lookup_sam_name(struct torture_context *torture)
r.in.domain_name = lpcfg_workgroup(torture->lp_ctx);
status = libnet_LookupName(ctx, mem_ctx, &r);
torture_assert_ntstatus_ok_goto(torture, status, ret, done,
"libnet_LookupName: failed");
done:
talloc_free(mem_ctx);
talloc_free(ctx);
return true;
return ret;
}