about summary refs log tree commit diff
path: root/nis/nss_nis/nis-pwd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-01-19 19:22:02 +0000
committerUlrich Drepper <drepper@redhat.com>2003-01-19 19:22:02 +0000
commitb677d6742888747613ebb4dbe4bbb4dbe6e07087 (patch)
tree97ebb6523b2a78ebccff54651bf2fe7736943ec5 /nis/nss_nis/nis-pwd.c
parent978bd14399d7b027513676bb1ad9c8b8def71174 (diff)
downloadglibc-b677d6742888747613ebb4dbe4bbb4dbe6e07087.tar.gz
glibc-b677d6742888747613ebb4dbe4bbb4dbe6e07087.tar.xz
glibc-b677d6742888747613ebb4dbe4bbb4dbe6e07087.zip
Update.
2003-01-19  Ulrich Drepper  <drepper@redhat.com>

	* nis/nss_nis/nis-spwd.c: Make _nss_nis_endspent an alias of
	_nss_nis_setspent.  Work around the different prototypes.
	* nis/nss_nis/nis-rpc.c (internal_nis_setrpcent): Use
	internal_nis_endrpcent.
	(internal_nis_endrpcent): Change return type to void.  Change callers.
	* nis/nss_nis/nis-pwd.c: Make _nss_nis_endpwent an alias of
	_nss_nis_setpwent.  Work around the different prototypes.
	* nis/nss_nis/nis-proto.c (_nss_nis_endprotoent): Split out body
	of the function to...
	(internal_nis_endprotoent): ... here.  New function.
	(internal_nis_setprotoent): Use internal_nis_endprotoent.
	* nis/nss_nis/nis-network.c: Make _nss_nis_endnetent an alias of
	_nss_nis_setnetent.  Work around the different prototypes.
	* nis/nss_nis/nis-netgrp.c (_nss_nis_endnetgrent): Split out body
	of the function to...
	(internal_nis_endnetgrent): ... here.  New function.
	(_nss_nis_setnetgrent): Use internal_nis_endnetgrent.
Diffstat (limited to 'nis/nss_nis/nis-pwd.c')
-rw-r--r--nis/nss_nis/nis-pwd.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/nis/nss_nis/nis-pwd.c b/nis/nss_nis/nis-pwd.c
index da5ffabff1..0f56ced014 100644
--- a/nis/nss_nis/nis-pwd.c
+++ b/nis/nss_nis/nis-pwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1998, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
 
@@ -18,7 +18,11 @@
    02111-1307 USA.  */
 
 #include <nss.h>
+/* The following is an ugly trick to avoid a prototype declaration for
+   _nss_nis_endpwent.  */
+#define _nss_nis_endpwent _nss_nis_endpwent_XXX
 #include <pwd.h>
+#undef _nss_nis_endpwent
 #include <ctype.h>
 #include <errno.h>
 #include <string.h>
@@ -58,24 +62,10 @@ _nss_nis_setpwent (int stayopen)
 
   return NSS_STATUS_SUCCESS;
 }
-
-enum nss_status
-_nss_nis_endpwent (void)
-{
-  __libc_lock_lock (lock);
-
-  new_start = 1;
-  if (oldkey != NULL)
-    {
-      free (oldkey);
-      oldkey = NULL;
-      oldkeylen = 0;
-    }
-
-  __libc_lock_unlock (lock);
-
-  return NSS_STATUS_SUCCESS;
-}
+/* Make _nss_nis_endpwent an alias of _nss_nis_setpwent.  We do this
+   even though the prototypes don't match.  The argument of setpwent
+   is not used so this makes no difference.  */
+strong_alias (_nss_nis_setpwent, _nss_nis_endpwent)
 
 static enum nss_status
 internal_nis_getpwent_r (struct passwd *pwd, char *buffer, size_t buflen,