summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-12 08:31:46 -0400
committerLennart Poettering <lennart@poettering.net>2017-05-12 14:31:46 +0200
commit5486a31d287f26bcd7c0a4eb2abfa4c074b985f1 (patch)
treed1e644d972fe60531ab0e17be6deb6c86941ad75 /meson.build
parent3823da25cf0d374851321d0c5fa5bce872ef5f2b (diff)
downloadsystemd-5486a31d287f26bcd7c0a4eb2abfa4c074b985f1.tar.gz
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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build11
1 files changed, 5 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index af97969f57..6e3901c85e 100644
--- a/meson.build
+++ b/meson.build
@@ -1150,15 +1150,14 @@ test_dlopen = executable(
link_with : [libbasic],
dependencies : [libdl])
-foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
- ['systemd', '', []],
- ['mymachines', 'ENABLE_MACHINED', []],
- ['resolve', 'ENABLE_RESOLVED', [libdl]]]
+foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME'],
+ ['systemd', '' ],
+ ['mymachines', 'ENABLE_MACHINED'],
+ ['resolve', 'ENABLE_RESOLVED']]
condition = tuple[1] == '' or conf.get(tuple[1], false)
if condition
module = tuple[0]
- extra_deps = tuple[2]
sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
version_script_arg = join_paths(meson.current_source_dir(), sym)
@@ -1174,7 +1173,7 @@ foreach tuple : [['myhostname', 'HAVE_MYHOSTNAME', []],
link_with : [libsystemd_internal,
libbasic],
dependencies : [threads,
- librt] + extra_deps,
+ librt],
link_depends : sym,
install : true,
install_dir : rootlibdir)