This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix bug in `getent' when dumping the shadow database


Hi!

While testing a new database backend I'm working on, I spotted a bug
in nss/getent.c, where a wrong function is used to close the database.

diff --git a/ChangeLog b/ChangeLog
index fffe816..835de60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-22  Jan-Benedict Glaw  <jbglaw@getslash.de>
+
+	* nss/getent.c: (shadow_keys): Fix closing of shadow database.
+
 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 aa4eaf9..8a3c864 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;
     }
 

MfG, JBG

-- 
Getslash GmbH, BahnhofstraÃe 16, 59302 Oelde
Tel: +49-2522-834349-5    Fax:   +49-2522-834349-1
http://www.getslash.de    Mobil: +49-152-33822499
Sitz der Gesellschaft: Oelde
Handelsregister: Amtsgericht MÃnster, HRB 11911
Ust-Id-Nr.: DE 815060326
GeschÃftsfÃhrung: Andre Peitz, Tobias Hanisch

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]