glibc/grp
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
..
compat-initgroups.c grp: Rewrite to use struct scratch_buffer instead of extend_alloca 2015-04-08 21:07:03 +02:00
fgetgrent_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fgetgrent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getgrent_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getgrent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getgrgid_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getgrgid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getgrnam_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getgrnam.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
grp-merge.c NSS: Do not use internal_function for functions with hidden aliases 2017-08-13 21:10:56 +02:00
grp-merge.h NSS: Do not use internal_function for functions with hidden aliases 2017-08-13 21:10:56 +02:00
grp.h Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
initgroups.c NSS: Replace exported NSS lookup functions with stubs [BZ #21962] 2017-08-14 18:13:42 +02:00
Makefile Fix missing redirects in testsuite targets 2017-08-07 18:13:36 +02:00
putgrent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setgroups.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
testgrp.c * malloc/memusagestat.c (main): Use return instead of exit to 2000-12-31 10:52:32 +00:00
tst_fgetgrent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst_fgetgrent.sh Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-putgrent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions NSS: Implement group merging support. 2016-04-29 22:18:21 -04:00