glibc/nss
Florian Weimer 36861a968a nss_files: Add generic code for set*ent, end*ent and file open
This reduces RSS usage if nss_files is not actually used, and can
be used later to make NSS data thread-specific.  It also results in
a small code size reduction.

Before:

   text	   data	    bss	    dec	    hex	filename
   2288	      0	     72	   2360	    938	nss/files-alias.os
   1807	      0	     72	   1879	    757	nss/files-ethers.os
   1371	      0	     72	   1443	    5a3	nss/files-grp.os
   6246	      0	     72	   6318	   18ae	nss/files-hosts.os
    869	      0	      0	    869	    365	nss/files-initgroups.os
    666	      0	      0	    666	    29a	nss/files-init.os
   1934	      0	      0	   1934	    78e	nss/files-netgrp.os
   2353	      0	     72	   2425	    979	nss/files-network.os
   2130	      0	     72	   2202	    89a	nss/files-proto.os
   1372	      0	     72	   1444	    5a4	nss/files-pwd.os
   2124	      0	     72	   2196	    894	nss/files-rpc.os
   2265	      0	     72	   2337	    921	nss/files-service.os
   1125	      0	     72	   1197	    4ad	nss/files-sgrp.os
   1124	      0	     72	   1196	    4ac	nss/files-spwd.os

After:

   text	   data	    bss	    dec	    hex	filename
   2040	      0	      0	   2040	    7f8	nss/files-alias.os
   1599	      0	      0	   1599	    63f	nss/files-ethers.os
   1155	      0	      0	   1155	    483	nss/files-grp.os
   6010	      0	      0	   6010	   177a	nss/files-hosts.os
    869	      0	      0	    869	    365	nss/files-initgroups.os
    666	      0	      0	    666	    29a	nss/files-init.os
   1934	      0	      0	   1934	    78e	nss/files-netgrp.os
   2129	      0	      0	   2129	    851	nss/files-network.os
   1914	      0	      0	   1914	    77a	nss/files-proto.os
   1156	      0	      0	   1156	    484	nss/files-pwd.os
   1908	      0	      0	   1908	    774	nss/files-rpc.os
   2057	      0	      0	   2057	    809	nss/files-service.os
    909	      0	      0	    909	    38d	nss/files-sgrp.os
    908	      0	      0	    908	    38c	nss/files-spwd.os
   1090	      0	      8	   1098	    44a	nss/nss_files_data.os

27674 code bytes before, 26344 code bytes after, so it is an overall
win despite the extra initialization code.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-07-07 18:33:52 +02:00
..
nss_compat nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_db Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_files nss_files: Add generic code for set*ent, end*ent and file open 2021-07-07 18:33:52 +02:00
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 nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] 2019-07-10 14:51:18 -04:00
tst-nss-db-endpwent.root nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] 2019-07-10 14:51:18 -04:00
tst-nss-files-hosts-long.root/etc nss: tst-nss-files-hosts-long: Add host.conf [BZ #21915] 2019-02-21 16:02:29 -05:00
tst-nss-test3.root Add test-in-container infrastructure. 2018-08-22 21:20:37 -04:00
tst-reload1.root nsswitch: user new internal API (tests) 2020-12-04 17:16:01 -05:00
tst-reload2.root nss: Re-enable NSS module loading after chroot [BZ #27389] 2021-03-02 16:14:18 -05:00
alias-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bug17079.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bug-erange.c Update. 2002-09-29 18:25:48 +00:00
compat-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
databases.def nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
db-Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Depend Update. 2000-01-02 04:20:21 +00:00
digits_dots.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ethers-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
function.def Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getent.c Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
getnssent_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getnssent.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getXXbyYY_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getXXbyYY.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getXXent_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
getXXent.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
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 Use a #pragma to suppress a bogus GCC 10 warning instead of an assert [BZ 27832]. 2021-05-10 14:30:09 -06:00
Makefile nss_files: Add generic code for set*ent, end*ent and file open 2021-07-07 18:33:52 +02:00
netgrp-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_action.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_action.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_database.c Use 64 bit time_t stat internally 2021-06-22 12:09:52 -03: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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_files_data.c nss_files: Add generic code for set*ent, end*ent and file open 2021-07-07 18:33:52 +02:00
nss_files_fopen.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_hash.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_module.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_module.h nsswitch: do not reload if "/" changes 2021-01-27 13:35:15 -05:00
nss_parse_line_result.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_readline.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_test1.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_test2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nss_test.h nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nss_test.ver Extend NSS test suite 2017-07-17 15:52:44 -04:00
nss.h nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent 2021-06-29 12:06:40 +02:00
nsswitch.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
nsswitch.conf Remove --enable-obsolete-nsl configure flag 2020-07-08 17:25:57 +02:00
nsswitch.h nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
proto-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
pwd-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00
rewrite_field.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
rpc-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
service-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
test-netdb.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-cancel-getpwuid_r.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-field.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-db-endpwent.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-files-alias-leak.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-files-alias-truncated.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-files-hosts-erange.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-files-hosts-getent.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-files-hosts-long.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-files-hosts-multi.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-getpwent.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-static.c Update nss tests to new skeleton 2017-08-17 18:00:51 -04:00
tst-nss-test1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-test2.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-test3.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-test4.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-nss-test5.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-reload1.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-reload2.c nss: Re-enable NSS module loading after chroot [BZ #27389] 2021-03-02 16:14:18 -05:00
valid_field.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
valid_list_field.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions nss_files: Add generic code for set*ent, end*ent and file open 2021-07-07 18:33:52 +02:00
XXX-lookup.c nss: fix nss_database_lookup2's alternate handling [BZ #27416] 2021-03-09 14:34:50 -05:00