Emailing: 0001-Add-IPv6-support-for-determining-FQDN-during-ADS-joi.patch
Jeremy Allison
jra at samba.org
Tue May 12 12:26:50 MDT 2015
On Tue, May 12, 2015 at 06:02:14PM +0100, David Holder wrote:
> Hi All,
>
> Please could you review the attached.
>
> The existing code uses gethostbyname() which is obsoleted and should
> not be used.
>
> This patch uses getaddrinfo(). With the AI_CANONNAME flag set,
> getaddrinfo() returns the canonical name of the host (that is its
> FQDN) in the first addrinfo struct. It only puts the canonical name
> in the first addrinfo struct as there should only ever be one FQDN.
>
> The bad news with using getaddrinfo() is that for it to work
> /etc/hosts must be formatted correctly. It is less forgiving than
> gethostbyname() and does not return all the aliases. As a result,
> the FQDN must come before any aliases in /etc/hosts. I have added
> additional DEBUG messages to catch this. Please let me know if you
> think this may be a problem.
>
> There are still a number of other places that gethostbyname() is
> used. I plan, with time, to eradicate them all. This just happens to
> be one that has caused me grief.
Reviewed-by: Jeremy Allison <jra at samba.org>
Can I get a second Team reviewer ?
More information about the samba-technical
mailing list