glibc/nss
DJ Delorie 9b456c5da9 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.
2021-03-09 14:34:50 -05:00
..
nss_compat nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_db
nss_files
tst-nss-compat1.root nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
tst-nss-db-endgrent.root/etc
tst-nss-db-endpwent.root
tst-nss-files-hosts-long.root/etc
tst-nss-test3.root
tst-reload1.root
tst-reload2.root nss: Re-enable NSS module loading after chroot [BZ #27389] 2021-03-02 16:14:18 -05:00
alias-lookup.c
bug17079.c
bug-erange.c
compat-lookup.c
databases.def nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
db-Makefile
Depend
digits_dots.c
ethers-lookup.c
function.def
getent.c
getnssent_r.c
getnssent.c
getXXbyYY_r.c
getXXbyYY.c
getXXent_r.c
getXXent.c
grp-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
hosts-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
key-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
makedb.c
Makefile nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
netgrp-lookup.c
network-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_action_parse.c
nss_action.c
nss_action.h
nss_database.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_database.h nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_fgetent_r.c
nss_files_fopen.c
nss_hash.c
nss_module.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_module.h
nss_parse_line_result.c
nss_readline.c
nss_test1.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_test2.c
nss_test.h nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_test.ver
nss.h
nsswitch.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nsswitch.conf
nsswitch.h nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
proto-lookup.c
pwd-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
rewrite_field.c
rpc-lookup.c
service-lookup.c
sgrp-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
spwd-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
test-digits-dots.c
test-netdb.c
tst-cancel-getpwuid_r.c
tst-field.c
tst-nss-compat1.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
tst-nss-db-endgrent.c
tst-nss-db-endpwent.c
tst-nss-files-alias-leak.c
tst-nss-files-alias-truncated.c
tst-nss-files-hosts-erange.c
tst-nss-files-hosts-getent.c
tst-nss-files-hosts-long.c
tst-nss-files-hosts-multi.c
tst-nss-getpwent.c
tst-nss-static.c
tst-nss-test1.c
tst-nss-test2.c
tst-nss-test3.c
tst-nss-test4.c
tst-nss-test5.c
tst-reload1.c
tst-reload2.c nss: Re-enable NSS module loading after chroot [BZ #27389] 2021-03-02 16:14:18 -05:00
valid_field.c
valid_list_field.c
Versions nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
XXX-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00