torture: fix check_pw_with_krb5 in the rpc:lsa test
authorMichael Adam <obnox@samba.org>
Thu, 17 Dec 2015 12:59:58 +0000 (13:59 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:26 +0000 (12:25 +0100)
Don't use AI_NUMERICHOST for getaddrinfo.
This is so that a host*NAME* handed in will get properly resolved.
Bug uncovered by the new nss_wrapper code (1.1.2)  which fixed
the handling of the AI_NUMERICHOST flag in getaddrinfo.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/torture/rpc/lsa.c

index d336016ee85fadde3e02d70299feaf397c848fab..d2180db976ca71eb9962a8bdf300b878ce10a4a3 100644 (file)
@@ -3217,7 +3217,7 @@ static bool check_pw_with_krb5(struct torture_context *tctx,
        k5ret = smb_krb5_init_context(ctx, tctx->lp_ctx, &ctx->smb_krb5_context);
        torture_assert_int_equal(tctx, k5ret, 0, "smb_krb5_init_context failed");
 
-       ok = interpret_string_addr_internal(&ctx->server, host, AI_NUMERICHOST);
+       ok = interpret_string_addr_internal(&ctx->server, host, 0);
        torture_assert(tctx, ok, "Failed to parse target server");
        talloc_set_destructor(ctx, check_pw_with_krb5_ctx_destructor);