diff options
author | Arthur Gautier <baloo@superbaloo.net> | 2021-10-14 21:54:29 +0000 |
---|---|---|
committer | Arthur Gautier <baloo@superbaloo.net> | 2021-10-15 02:59:00 +0000 |
commit | ca8989daf36629ce47cf35d6e56f92d01f3172ec (patch) | |
tree | f34dae5e61bfcf29d5155a6b08153dd378cd6097 /src/libmain/shared.cc | |
parent | 85717eff15fadd625014ed57de80f59304fa67db (diff) |
preloadNSS: warn if unable to open nss backend
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 1fb2d62d3..da3bc3bb5 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -125,7 +125,9 @@ static void preloadNSS() { load its lookup libraries in the parent before any child gets a chance to. */ std::call_once(dns_resolve_flag, []() { #ifdef __GLIBC__ - dlopen (LIBNSS_DNS_SO, RTLD_NOW); + if (dlopen (LIBNSS_DNS_SO, RTLD_NOW) == NULL) { + printMsg(Verbosity::lvlWarn, fmt("Unable to load nss_dns backend")); + } __nss_configure_lookup ("hosts", "dns"); #endif }); |