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;