-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-8.10
-
No
-
None
-
rhel-sst-pt-libraries
-
ssg_platform_tools
-
1
-
False
-
-
None
-
None
-
None
-
None
-
None
What were you trying to do that didn't work?
NetworkManager spawns a process that calls __nss_configure_lookup() multiple times to try the resolution with different NSS services. This works well on RHEL9 but doesn't work on RHEL8, as it seems that only the first call to __nss_configure_lookup() has effect.
Please provide the package NVR for which bug is seen:
glibc-2.28-251.el8_10.2.x86_64
How reproducible:
Always.
Steps to reproduce
- Add an "172.16.16.16 foobaz" entry to /etc/hosts
- Clear the content of /etc/resolv.conf
- Use the attached program to resolve the address using different NSS services:resolve.c
Expected results
When using the "dns" service, the resolution should fail. When using the "files" service, the program should return "foobaz". When using multiple services, it should give the expected result for each service, like in:
[root@localhost ~]# ./resolve dns files * Resolving via 'dns' getnameinfo() failed: -3 (Temporary failure in name resolution) * Resolving via 'files' foobaz
Actual results
On RHEL 8, the program works as expected when using a single service. However, when using multiple services in the same process it seems that only the first call to __nss_configure_lookup() has effect.
[root@localhost ~]# ./resolve dns files * Resolving via 'dns' getnameinfo() failed: -3 (Temporary failure in name resolution) * Resolving via 'files' getnameinfo() failed: -3 (Temporary failure in name resolution) [root@localhost ~]# ./resolve files dns * Resolving via 'files' foobaz * Resolving via 'dns' foobaz
Notes
The same test program works as expected on RHEL9.
fweimer@redhat.com mentioned on slack that the glibc code in this area in RHEL 8 and RHEL 9 is very different, so it could be a bug fixed by accident.