glibc/nscd
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
..
aicache.c
cache.c
cachedumper.c
connections.c
dbg_log.c
dbg_log.h
Depend
gai.c
getgrgid_r.c
getgrnam_r.c
gethstbyad_r.c
gethstbynm3_r.c
getpwnam_r.c
getpwuid_r.c
getsrvbynm_r.c
getsrvbypt_r.c
grpcache.c
hstcache.c
initgrcache.c
Makefile
mem.c
netgroupcache.c
nscd_conf.c
nscd_getai.c
nscd_getgr_r.c
nscd_gethst_r.c
nscd_getpw_r.c
nscd_getserv_r.c
nscd_helper.c
nscd_initgroups.c
nscd_netgroup.c
nscd_proto.h
nscd_setup_thread.c
nscd_stat.c
nscd-client.h
nscd.c
nscd.conf
nscd.h
nscd.init
nscd.service
nscd.tmpfiles
pwdcache.c
res_hconf.c
selinux.c
selinux.h
servicescache.c