aboutsummaryrefslogtreecommitdiff
path: root/nss/nsswitch.h
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2021-02-15 21:34:23 -0500
committerDJ Delorie <dj@redhat.com>2021-03-09 14:34:50 -0500
commit9b456c5da968ee832ea4b2b73a18a5bf6d2118a6 (patch)
treee0f9e838dd5862499207e16cf6e8b3d15d49d374 /nss/nsswitch.h
parent24eb3be5db5befefe4bcf0f438bf6629a9c3a608 (diff)
downloadglibc-9b456c5da968ee832ea4b2b73a18a5bf6d2118a6.tar
glibc-9b456c5da968ee832ea4b2b73a18a5bf6d2118a6.tar.gz
glibc-9b456c5da968ee832ea4b2b73a18a5bf6d2118a6.tar.bz2
glibc-9b456c5da968ee832ea4b2b73a18a5bf6d2118a6.zip
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.
Diffstat (limited to 'nss/nsswitch.h')
-rw-r--r--nss/nsswitch.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index c483bbd891..ab782b605e 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -88,15 +88,6 @@ extern bool __nss_database_custom[NSS_DBSIDX_max] attribute_hidden;
/* Interface functions for NSS. */
-/* Get the data structure representing the specified database.
- If there is no configuration for this database in the file,
- parse a service list from DEFCONFIG and use that. More
- than one function can use the database. */
-extern int __nss_database_lookup2 (const char *database,
- const char *alternative_name,
- const char *defconfig, struct nss_action **ni);
-libc_hidden_proto (__nss_database_lookup2)
-
/* Put first function with name FCT_NAME for SERVICE in FCTP. The
position is remembered in NI. The function returns a value < 0 if
an error occurred or no such function exists. */