Emailing: 0001-Add-IPv6-support-for-determining-FQDN-during-ADS-joi.patch
Ralph Böhme
rb at sernet.de
Tue May 12 12:43:26 MDT 2015
On Tue, May 12, 2015 at 11:26:50AM -0700, Jeremy Allison wrote:
> 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 ?
rb: me.
Cheerio!
-slow
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
More information about the samba-technical
mailing list