about summary refs log tree commit diff
path: root/nss/nss_compat/compat-spwd.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-02-12 11:30:06 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-02-13 09:14:26 +0100
commit8a9221415041543aa163071fa547e88138ceec9d (patch)
treead66eb4c2fa87e6ccb2915ff340d74c9373e0892 /nss/nss_compat/compat-spwd.c
parent9333498794cde1d5cca518badf79533a24114b6f (diff)
downloadglibc-8a9221415041543aa163071fa547e88138ceec9d.tar.gz
glibc-8a9221415041543aa163071fa547e88138ceec9d.tar.xz
glibc-8a9221415041543aa163071fa547e88138ceec9d.zip
nss_compat: Do not use nss_* names for function pointers
A future commit will use these names for types of functions
in NSS service modules.

Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'nss/nss_compat/compat-spwd.c')
-rw-r--r--nss/nss_compat/compat-spwd.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/nss/nss_compat/compat-spwd.c b/nss/nss_compat/compat-spwd.c
index f6b7a1ef15..15f5b95bb0 100644
--- a/nss/nss_compat/compat-spwd.c
+++ b/nss/nss_compat/compat-spwd.c
@@ -32,13 +32,13 @@
 #include "nisdomain.h"
 
 static service_user *ni;
-static enum nss_status (*nss_setspent) (int stayopen);
-static enum nss_status (*nss_getspnam_r) (const char *name, struct spwd * sp,
-					  char *buffer, size_t buflen,
-					  int *errnop);
-static enum nss_status (*nss_getspent_r) (struct spwd * sp, char *buffer,
-					  size_t buflen, int *errnop);
-static enum nss_status (*nss_endspent) (void);
+static enum nss_status (*setspent_impl) (int stayopen);
+static enum nss_status (*getspnam_r_impl) (const char *name, struct spwd * sp,
+					   char *buffer, size_t buflen,
+					   int *errnop);
+static enum nss_status (*getspent_r_impl) (struct spwd * sp, char *buffer,
+					   size_t buflen, int *errnop);
+static enum nss_status (*endspent_impl) (void);
 
 /* Get the declaration of the parser function.  */
 #define ENTNAME spent
@@ -88,10 +88,10 @@ init_nss_interface (void)
   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");
-      nss_getspent_r = __nss_lookup_function (ni, "getspent_r");
-      nss_endspent = __nss_lookup_function (ni, "endspent");
+      setspent_impl = __nss_lookup_function (ni, "setspent");
+      getspnam_r_impl = __nss_lookup_function (ni, "getspnam_r");
+      getspent_r_impl = __nss_lookup_function (ni, "getspent_r");
+      endspent_impl = __nss_lookup_function (ni, "endspent");
     }
 }
 
@@ -190,8 +190,8 @@ internal_setspent (ent_t *ent, int stayopen, int needent)
 
   give_spwd_free (&ent->pwd);
 
-  if (needent && status == NSS_STATUS_SUCCESS && nss_setspent)
-    ent->setent_status = nss_setspent (stayopen);
+  if (needent && status == NSS_STATUS_SUCCESS && setspent_impl)
+    ent->setent_status = setspent_impl (stayopen);
 
   return status;
 }
@@ -251,8 +251,8 @@ _nss_compat_endspent (void)
 
   __libc_lock_lock (lock);
 
-  if (nss_endspent)
-    nss_endspent ();
+  if (endspent_impl)
+    endspent_impl ();
 
   result = internal_endspent (&ext_ent);
 
@@ -270,7 +270,7 @@ getspent_next_nss_netgr (const char *name, struct spwd *result, ent_t *ent,
   char *curdomain = NULL, *host, *user, *domain, *p2;
   size_t p2len;
 
-  if (!nss_getspnam_r)
+  if (!getspnam_r_impl)
     return NSS_STATUS_UNAVAIL;
 
   /* If the setpwent call failed, say so.  */
@@ -330,7 +330,7 @@ getspent_next_nss_netgr (const char *name, struct spwd *result, ent_t *ent,
       p2 = buffer + (buflen - p2len);
       buflen -= p2len;
 
-      if (nss_getspnam_r (user, result, buffer, buflen, errnop)
+      if (getspnam_r_impl (user, result, buffer, buflen, errnop)
 	  != NSS_STATUS_SUCCESS)
 	continue;
 
@@ -356,7 +356,7 @@ getspent_next_nss (struct spwd *result, ent_t *ent,
   char *p2;
   size_t p2len;
 
-  if (!nss_getspent_r)
+  if (!getspent_r_impl)
     return NSS_STATUS_UNAVAIL;
 
   p2len = spwd_need_buflen (&ent->pwd);
@@ -369,7 +369,7 @@ getspent_next_nss (struct spwd *result, ent_t *ent,
   buflen -= p2len;
   do
     {
-      if ((status = nss_getspent_r (result, buffer, buflen, errnop))
+      if ((status = getspent_r_impl (result, buffer, buflen, errnop))
 	  != NSS_STATUS_SUCCESS)
 	return status;
     }
@@ -386,7 +386,7 @@ static enum nss_status
 getspnam_plususer (const char *name, struct spwd *result, ent_t *ent,
 		   char *buffer, size_t buflen, int *errnop)
 {
-  if (!nss_getspnam_r)
+  if (!getspnam_r_impl)
     return NSS_STATUS_UNAVAIL;
 
   struct spwd pwd;
@@ -407,8 +407,8 @@ getspnam_plususer (const char *name, struct spwd *result, ent_t *ent,
   char *p = buffer + (buflen - plen);
   buflen -= plen;
 
-  enum nss_status status = nss_getspnam_r (name, result, buffer, buflen,
-					   errnop);
+  enum nss_status status = getspnam_r_impl (name, result, buffer, buflen,
+					    errnop);
   if (status != NSS_STATUS_SUCCESS)
     return status;