#include "krb5_locl.h"
-RCSID("$Id: expand_hostname.c,v 1.12 2004/05/25 21:24:14 lha Exp $");
+RCSID("$Id: expand_hostname.c 22229 2007-12-08 21:40:59Z lha $");
static krb5_error_code
copy_hostname(krb5_context context,
struct addrinfo *ai, *a, hints;
int error;
+ if ((context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) == 0)
+ return copy_hostname (context, orig_hostname, new_hostname);
+
memset (&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
- if (!context->fdns) {
- return copy_hostname (context, orig_hostname, new_hostname);
- }
-
error = getaddrinfo (orig_hostname, NULL, &hints, &ai);
if (error)
return copy_hostname (context, orig_hostname, new_hostname);
int error;
krb5_error_code ret = 0;
- if (!context->fdns) {
+ if ((context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) == 0)
return vanilla_hostname (context, orig_hostname, new_hostname,
realms);
- }
memset (&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;