Modifying gethostxxx() under Solaris

Nicolas Williams Nicolas.Williams at
Tue Mar 18 11:12:47 EST 2003

One way to avoid this is to make sure that:

a) your /etc/inet/hosts file lists FQDN forms first
b) your name service is DNS (if not then make sure that NIS/NIS+ are
   configured to return FQDNs as the cacnonical host names)



On Mon, Mar 17, 2003 at 02:02:22PM +0100, Degrande_Samuel wrote:
> Hello, 
> We are on the way to add Kerberos authentication on our
> network.
> We have Sun servers, running SEAM (under Solaris9), and we
> use it to authenticate NFS access.
> In order to use Kerberos authentication with SSH, I
> compiled the SSH implementation provided by with
> the Kerberos 5 library provided by the MIT. And, as expected,
> I have the problem of Sun's gethostbyname() not returning 
> FQN hostnames.
> Sun's SEAM using FQN, I should then create 2 principals for each
> server, host/hostname at REALM and host/hostname.domainname at REALM,
> which is not a good solution, I guess.
> So, I created a little workaround :
> I replaced all calls to gethostbyname(), gethostbyaddr() and
> gethostname() in the krb distribution with a call to,
> respectively, FQN_gethostbyname(), FQN_gethostbyaddr() and
> FQN_gethostname().
> Those new functions add the DNS default domain when a short
> hostname is returned.
> I know it's rather an ugly patch, but it solved my problem, 
> Kerberos authentication with NFS as well as with SSH using now 
> full hostnames.
> I just would like to know if there could exist a side effect 
> that I didn't already discovered, which could ruin my try to unify 
> the two Kerberos distributions that I'm using.
> Regards.
> -- 
> Samuel Degrande           LIFL - UMR 8022 CNRS - Bat M3
> Phone: (33)  USTL - Universite de Lille 1
> _______________________________________________
> krbdev mailing list             krbdev at

More information about the krbdev mailing list