From 9b456c5da968ee832ea4b2b73a18a5bf6d2118a6 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 15 Feb 2021 21:34:23 -0500 Subject: nss: fix nss_database_lookup2's alternate handling [BZ #27416] __nss_database_lookup2's extra arguments were left unused in the nsswitch reloading patch set; this broke compat (default config ignored) and shadow files (secondary name ignored) which relies on these fallbacks. This patch adds in the previous behavior by correcting the initialization of the database list to reflect the fallbacks. This means that the nss_database_lookup2 interface no longer needs to be passed the fallback info, so API and callers were adjusted. Since all callers needed to be edited anyway, the calls were changed from __nss_database_lookup2 to the faster __nss_database_get. This was an intended optimization which was deferred during the initial lookup changes to avoid touching so many files. The test case verifies that compat targets work (passwd) and that the default configuration works (group). Tested on x86-64. --- nss/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'nss/Makefile') diff --git a/nss/Makefile b/nss/Makefile index 0906202db9..71fbe583bf 100644 --- a/nss/Makefile +++ b/nss/Makefile @@ -63,6 +63,7 @@ tests = test-netdb test-digits-dots tst-nss-getpwent bug17079 \ xtests = bug-erange tests-container = \ + tst-nss-compat1 \ tst-nss-test3 \ tst-nss-files-hosts-long \ tst-nss-db-endpwent \ -- cgit 1.4.1