]> git.ipfire.org Git - thirdparty/systemd.git/commit - meson.build
nss-resolve: drop the internal fallback to libnss_dns (#5945)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 May 2017 12:31:46 +0000 (08:31 -0400)
committerLennart Poettering <lennart@poettering.net>
Fri, 12 May 2017 12:31:46 +0000 (14:31 +0200)
commit5486a31d287f26bcd7c0a4eb2abfa4c074b985f1
treed1e644d972fe60531ab0e17be6deb6c86941ad75
parent3823da25cf0d374851321d0c5fa5bce872ef5f2b
nss-resolve: drop the internal fallback to libnss_dns (#5945)

If we could not communicate with systemd-resolved, we would call into
libnss_dns. libnss_dns would return NOTFOUND for stuff like "localhost" and
other names resolved by nss-myhostname, which we would fall under the !UNAVAIL=
condition and cause resolution to fail. So the following recommended
configuration in nsswitch.conf would not work:

   hosts: resolve [!UNAVAIL=return] dns myhostname

Remove the internal fallback code completely so that the fallback logic
can be configured in nsswitch.conf.

Tested with
   hosts: resolve [!UNAVAIL=return] myhostname
and
   hosts: resolve [!UNAVAIL=return] dns myhostname

Fixes #5742.
Makefile.am
NEWS
meson.build
src/nss-resolve/nss-resolve.c