This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Name resolution of dot terminated hostnames
- From: Florian Weimer <fweimer at redhat dot com>
- To: Etienne Buira <etienne dot buira at free dot fr>
- Cc: libc-help at sourceware dot org
- Date: Fri, 24 May 2019 21:20:23 +0200
- Subject: Re: Name resolution of dot terminated hostnames
- References: <20190524185325.GB3662@Z926fQmE5jqhFMgp6>
* Etienne Buira:
> On a Gentoo box (with Gentoo packaged glibc 2.29-r2), libc was unable to
> resolve 'localhost.' (with the trailing dot), although it can resolve
> 'localhost', and conf looks fine.
>
> With older libcs, (at least 2.28 based), libc can resolve the dot
> terminated hostname just fine.
What's your /etc/nsswitch.conf file? What's in /etc/hosts?
> hostname(7) man page reads 'If the input name ends with a trailing dot,
> the trailing dot is removed, and the remaining name is looked up with no
> further processing.'
This covers DNS processing (“Internet name resolver”) only. A newer
version of the manpage should reflect that more
Thanks,
Florian