about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan-Benedict Glaw <jbglaw@getslash.de>2013-04-22 10:44:31 -0700
committerRoland McGrath <roland@hack.frob.com>2013-04-22 10:44:31 -0700
commitd34c915826734cf20b189e925aac9b9f176bcd53 (patch)
tree492b538a6e91c9ef4e3278f9f7e44a11c7023008
parentda1304bcc8d718f40e58d92726c0fbc7b0d0794d (diff)
downloadglibc-d34c915826734cf20b189e925aac9b9f176bcd53.tar.gz
glibc-d34c915826734cf20b189e925aac9b9f176bcd53.tar.xz
glibc-d34c915826734cf20b189e925aac9b9f176bcd53.zip
Fix getent to call endspent rather than endpwent for shadow database.
-rw-r--r--ChangeLog4
-rw-r--r--nss/getent.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fffe816c04..e16ef0a4e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-22  Jan-Benedict Glaw  <jbglaw@getslash.de>
+
+	* nss/getent.c (shadow_keys): Call endspent, not endpwent.
+
 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
 	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Compute results
diff --git a/nss/getent.c b/nss/getent.c
index aa4eaf9e0d..8a3c864501 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -841,7 +841,7 @@ shadow_keys (int number, char *key[])
       setspent ();
       while ((sp = getspent ()) != NULL)
 	print_shadow (sp);
-      endpwent ();
+      endspent ();
       return result;
     }