glibc/nss
Florian Weimer c88ffc239e NSS: Replace exported NSS lookup functions with stubs [BZ #21962]
Commit 384ca55174 from 2007 added this to
nss/XXX-lookup.c:

+#ifndef NO_COMPAT
+int
+internal_function attribute_compat_text_section
+DB_COMPAT_FCT (service_user **ni, const char *fct_name, void **fctp)
+{
+  return DB_LOOKUP_FCT (ni, fct_name, NULL, fctp);
+}
+#endif

That is, it adds a pseudo-compat function with an internal_function
attribute.  The function it was supposed to replace did not have the
attribute:

 extern int DB_LOOKUP_FCT (service_user **ni, const char *fct_name,
-			  void **fctp) internal_function;
+			  const char *fct2_name, void **fctp)
+  internal_function;

This changed the calling convention on i386 for the following
functions in the public ABI:

  __nss_passwd_lookup
  __nss_group_lookup
  __nss_hosts_lookup

This commit replaces the functions with always-failing stubs,
with true compat symbols.  Due to a happy accident, the calling
convention of the stub is identical for the internal_function
and non-internal_function case on i386.

In addition, this commit auto-generates the __nss_*_lookup2
function declarations as part of <nsswitch.h>.
2017-08-14 18:13:42 +02:00
..
nss_db Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
nss_files Assume that O_CLOEXEC is always defined and works 2017-04-18 14:56:51 +02:00
alias-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bug17079.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bug-erange.c
compat-lookup.c NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00
databases.def Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
db-Makefile Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Depend
digits_dots.c resolv: Introduce struct resolv_context [BZ #21668] 2017-07-03 20:52:59 +02:00
ethers-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
function.def Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getent.c Update copyright dates not handled by scripts/update-copyrights. 2017-01-01 00:26:24 +00:00
getnssent_r.c resolv: Introduce struct resolv_context [BZ #21668] 2017-07-03 20:52:59 +02:00
getnssent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getXXbyYY_r.c NSS: Do not use internal_function for functions with hidden aliases 2017-08-13 21:10:56 +02:00
getXXbyYY.c resolv: Introduce struct resolv_context [BZ #21668] 2017-07-03 20:52:59 +02:00
getXXent_r.c NSS: Do not use internal_function for functions with hidden aliases 2017-08-13 21:10:56 +02:00
getXXent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
grp-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hosts-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
key-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
makedb.c Update copyright dates not handled by scripts/update-copyrights. 2017-01-01 00:26:24 +00:00
Makefile NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00
netgrp-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
network-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nss_test1.c Fix nss/nss_test1.c compile with latest GCC. 2017-07-21 09:56:13 -07:00
nss_test2.c Extend NSS test suite 2017-07-17 15:52:44 -04:00
nss_test.h Extend NSS test suite 2017-07-17 15:52:44 -04:00
nss_test.ver Extend NSS test suite 2017-07-17 15:52:44 -04:00
nss.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nsswitch.c Fix build with --enable-static-nss [BZ #21088] 2017-03-15 13:32:23 -07:00
nsswitch.conf More configurability for secondary group lookup 2011-05-10 00:36:29 -04:00
nsswitch.h NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00
proto-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
pwd-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rewrite_field.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rpc-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
service-lookup.c NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00
sgrp-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
spwd-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
test-digits-dots.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
test-netdb.c Consistently use uintN_t not u_intN_t everywhere. 2017-08-07 19:55:34 +00:00
tst-cancel-getpwuid_r.c Miscellaneous low-risk changes preparing for _ISOMAC testsuite. 2017-03-01 20:32:50 -05:00
tst-field.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-nss-getpwent.c Increase some test timeouts. 2017-01-05 17:39:38 +00:00
tst-nss-static.c 2012-04-06 Paul Pluzhnikov <ppluzhnikov@google.com> 2012-04-06 13:49:35 -07:00
tst-nss-test1.c Extend NSS test suite 2017-07-17 15:52:44 -04:00
tst-nss-test2.c Extend NSS test suite 2017-07-17 15:52:44 -04:00
tst-nss-test3.c Extend NSS test suite 2017-07-17 15:52:44 -04:00
tst-nss-test4.c Extend NSS test suite 2017-07-17 15:52:44 -04:00
tst-nss-test5.c Correct nss/tst-nss-test5 configuration 2017-07-21 19:50:21 -04:00
valid_field.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
valid_list_field.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00
XXX-lookup.c NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00