Systemd/src/nss-resolve
Lennart Poettering 344874fcd0 nss-resolve: be a bit more careful with returning NSS_STATUS_NOTFOUND
Let's tighten the cases when our module returns NSS_STATUS_NOTFOUND. Let's do
so only if we actually managed to talk to resolved. In all other cases stick to
NSS_STATUS_UNAVAIL as before, as it clearly indicates that our module or the
system is borked, and the "dns" fallback should really take place.

In particular this fixes the 2nd-level fallback from our own dlopen() based
fallback handling. In this case we really should return UNAVAIL so that the
caller can apply its own fallback still.

Fix-up for d7247512a9.

Note that our own dlopen() based fallback is pretty much redundant now if
nsswitch.conf is configured like this:

   hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname

In a future release we should probably drop our internal fallback then, in
favour of this nsswitch.conf-based one.
2016-10-24 19:04:43 +02:00
..
Makefile resolved: add small NSS module that uses resolved to resolve DNS names 2014-07-16 03:31:30 +02:00
nss-resolve.c nss-resolve: be a bit more careful with returning NSS_STATUS_NOTFOUND 2016-10-24 19:04:43 +02:00
nss-resolve.sym resolved: add small NSS module that uses resolved to resolve DNS names 2014-07-16 03:31:30 +02:00