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

Re: getaddrinfo() and AI_CANONNAME




>It seems that on AIX 4.3, getaddrinfo() returns unqualified name when it
>is called with nodename == local host name and hints->ai_flags ==
>AI_CANONNAME. /usr/lib/netdb.h refers to RFC2133 but RFC2133 does not define
>what a "canonical name" means, so I wouldn't call it a bug in AIX. But
>returning an unqualified name breaks krb5_sname_to_principal() when it is
>called with hostname == NULL.
>Would it be reasonable to call getnameinfo() on the data returned by
>getaddrinfo()? getnameinfo() guarantees the returning of a FQDN.

	ai_canonname has the same meaning as "h->h_name" and
	getaddrinfo must not do the reverse lookup (i.e. getnameinfo).
	so i don't think your patch is right.

itojun