Blame nss/compat-lookup.c

Packit Service 82fcde
/* Compatibility stubs of accidentally exported __nss_*_lookup functions.
Packit Service 82fcde
   Copyright (C) 2017-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 8c97eb
#include <nsswitch.h>
Packit Service 8c97eb
Packit Service 82fcde
#include <shlib-compat.h>
Packit Service 82fcde
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_27)
Packit Service 82fcde
Packit Service 82fcde
# include <errno.h>
Packit Service 82fcde
Packit Service 82fcde
/* On i386, the function calling convention changed from the standard
Packit Service 82fcde
   ABI calling convention to three register parameters in glibc 2.8.
Packit Service 82fcde
   The following error-returning stub happens to be compatible with
Packit Service 82fcde
   glibc 2.7 and earlier and glibc 2.8 and later, even on i386.  */
Packit Service 82fcde
int
Packit Service 82fcde
attribute_compat_text_section
Packit Service 82fcde
__nss_passwd_lookup (service_user **ni, const char *fct_name, void **fctp)
Packit Service 82fcde
{
Packit Service 82fcde
  __set_errno (ENOSYS);
Packit Service 82fcde
  return -1;
Packit Service 82fcde
}
Packit Service 82fcde
compat_symbol (libc, __nss_passwd_lookup, __nss_passwd_lookup, GLIBC_2_0);
Packit Service 82fcde
strong_alias (__nss_passwd_lookup, __nss_group_lookup)
Packit Service 82fcde
compat_symbol (libc, __nss_group_lookup, __nss_group_lookup, GLIBC_2_0);
Packit Service 82fcde
strong_alias (__nss_passwd_lookup, __nss_hosts_lookup)
Packit Service 82fcde
compat_symbol (libc, __nss_hosts_lookup, __nss_hosts_lookup, GLIBC_2_0);
Packit Service 82fcde
Packit Service 82fcde
#endif /* SHLIB_COMPAT */
Packit Service 8c97eb
Packit Service 8c97eb
Packit Service 8c97eb
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_30)
Packit Service 8c97eb
Packit Service 8c97eb
/* These functions were exported under a non-GLIBC_PRIVATE version,
Packit Service 8c97eb
   even though it is not usable externally due to the service_user
Packit Service 8c97eb
   type dependency.  */
Packit Service 8c97eb
Packit Service 8c97eb
int
Packit Service 8c97eb
attribute_compat_text_section
Packit Service 8c97eb
__nss_next (service_user **ni, const char *fct_name, void **fctp, int status,
Packit Service 8c97eb
            int all_values)
Packit Service 8c97eb
{
Packit Service 8c97eb
  return -1;
Packit Service 8c97eb
}
Packit Service 8c97eb
compat_symbol (libc, __nss_next, __nss_next, GLIBC_2_0);
Packit Service 8c97eb
Packit Service 8c97eb
int
Packit Service 8c97eb
attribute_compat_text_section
Packit Service 8c97eb
__nss_database_lookup (const char *database, const char *alternate_name,
Packit Service 8c97eb
                       const char *defconfig, service_user **ni)
Packit Service 8c97eb
{
Packit Service 8c97eb
  *ni = NULL;
Packit Service 8c97eb
  return -1;
Packit Service 8c97eb
}
Packit Service 8c97eb
compat_symbol (libc, __nss_database_lookup, __nss_database_lookup, GLIBC_2_0);
Packit Service 8c97eb
Packit Service 8c97eb
#endif /* SHLIB_COMPAT */