From cd7bc224159ca5965b6e9cd7b68d7f087e59e6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 17 Oct 2006 09:16:32 +0000 Subject: [PATCH] use dns_canonize_hostname to determin if we should talk to dns to find the canonical name of the host. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18505 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/expand_hostname.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/krb5/expand_hostname.c b/lib/krb5/expand_hostname.c index 6bc8d225f..84934ca52 100644 --- a/lib/krb5/expand_hostname.c +++ b/lib/krb5/expand_hostname.c @@ -62,6 +62,9 @@ krb5_expand_hostname (krb5_context context, struct addrinfo *ai, *a, hints; int error; + if (!context->dns_canonize_hostname) + return copy_hostname (context, orig_hostname, new_hostname); + memset (&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; @@ -124,6 +127,10 @@ krb5_expand_hostname_realms (krb5_context context, int error; krb5_error_code ret = 0; + if (!context->dns_canonize_hostname) + return vanilla_hostname (context, orig_hostname, new_hostname, + realms); + memset (&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME;