[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] krb5_get_host_realm could try harder to get a default fqdn



Hello,

Catching up with old mail...

> Attached is a patch to lib/krb5/get_host_realm.c that replaces the  
> call
> to gethostname in krb5_get_host_realm with a call to a new function
> dns_get_default_fqdn that calls gethostname and then, if necessary,
> gethostbyname. Basically it tries harder to find a default domain  
> name.
>
> My problem case is Debian Linux which, by default, sets the hostname
> to a non-FQDN name. And querying gethostbyname returns a name with a
> '.' at the end:

The problem is that doing DNS for hosts that doesn't have DNS is bad
since it takes a dns timeout or two for the function to return.

The current code avoids doing dns and hope that the KDC will return
referral instead, not that heimdal implements that for first component
matching in the AS-REQ path.

Love