aboutsummaryrefslogtreecommitdiff
path: root/nss/nss_compat
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-05-15 13:51:35 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-05-15 15:07:49 +0200
commita9368c34d70cef91ca59b09941f496df11d6b146 (patch)
tree238aa331f31e567299bcc80b49de7f4f8707a1a3 /nss/nss_compat
parentd50f09181eca10a91fd9035bb90711b265770dc9 (diff)
downloadglibc-a9368c34d70cef91ca59b09941f496df11d6b146.tar
glibc-a9368c34d70cef91ca59b09941f496df11d6b146.tar.gz
glibc-a9368c34d70cef91ca59b09941f496df11d6b146.tar.bz2
glibc-a9368c34d70cef91ca59b09941f496df11d6b146.zip
nss: Turn __nss_database_lookup into a compatibility symbol
The function uses the internal service_user type, so it is not really usable from the outside of glibc. Rename the function to __nss_database_lookup2 for internal use, and change __nss_database_lookup to always indicate failure to the caller. __nss_next already was a compatibility symbol. The new implementation always fails and no longer calls __nss_next2. unscd, the alternative nscd implementation, does not use __nss_database_lookup, so it is not affected by this change.
Diffstat (limited to 'nss/nss_compat')
-rw-r--r--nss/nss_compat/compat-grp.c2
-rw-r--r--nss/nss_compat/compat-initgroups.c2
-rw-r--r--nss/nss_compat/compat-pwd.c2
-rw-r--r--nss/nss_compat/compat-spwd.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/nss/nss_compat/compat-grp.c b/nss/nss_compat/compat-grp.c
index 24e499cc99..8f01e44a72 100644
--- a/nss/nss_compat/compat-grp.c
+++ b/nss/nss_compat/compat-grp.c
@@ -78,7 +78,7 @@ static bool in_blacklist (const char *, int, ent_t *);
static void
init_nss_interface (void)
{
- if (__nss_database_lookup ("group_compat", NULL, "nis", &ni) >= 0)
+ if (__nss_database_lookup2 ("group_compat", NULL, "nis", &ni) >= 0)
{
nss_setgrent = __nss_lookup_function (ni, "setgrent");
nss_getgrnam_r = __nss_lookup_function (ni, "getgrnam_r");
diff --git a/nss/nss_compat/compat-initgroups.c b/nss/nss_compat/compat-initgroups.c
index 318144b66b..b1df6a4e43 100644
--- a/nss/nss_compat/compat-initgroups.c
+++ b/nss/nss_compat/compat-initgroups.c
@@ -89,7 +89,7 @@ init_nss_interface (void)
/* Retest. */
if (ni == NULL
- && __nss_database_lookup ("group_compat", NULL, "nis", &ni) >= 0)
+ && __nss_database_lookup2 ("group_compat", NULL, "nis", &ni) >= 0)
{
nss_initgroups_dyn = __nss_lookup_function (ni, "initgroups_dyn");
nss_getgrnam_r = __nss_lookup_function (ni, "getgrnam_r");
diff --git a/nss/nss_compat/compat-pwd.c b/nss/nss_compat/compat-pwd.c
index bf9786179b..37f883f35a 100644
--- a/nss/nss_compat/compat-pwd.c
+++ b/nss/nss_compat/compat-pwd.c
@@ -88,7 +88,7 @@ static bool in_blacklist (const char *, int, ent_t *);
static void
init_nss_interface (void)
{
- if (__nss_database_lookup ("passwd_compat", NULL, "nis", &ni) >= 0)
+ if (__nss_database_lookup2 ("passwd_compat", NULL, "nis", &ni) >= 0)
{
nss_setpwent = __nss_lookup_function (ni, "setpwent");
nss_getpwnam_r = __nss_lookup_function (ni, "getpwnam_r");
diff --git a/nss/nss_compat/compat-spwd.c b/nss/nss_compat/compat-spwd.c
index c5e04cb967..bd310ab9aa 100644
--- a/nss/nss_compat/compat-spwd.c
+++ b/nss/nss_compat/compat-spwd.c
@@ -85,8 +85,8 @@ static bool in_blacklist (const char *, int, ent_t *);
static void
init_nss_interface (void)
{
- if (__nss_database_lookup ("shadow_compat", "passwd_compat",
- "nis", &ni) >= 0)
+ if (__nss_database_lookup2 ("shadow_compat", "passwd_compat",
+ "nis", &ni) >= 0)
{
nss_setspent = __nss_lookup_function (ni, "setspent");
nss_getspnam_r = __nss_lookup_function (ni, "getspnam_r");