This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch, master, updated. glibc-2.14-476-gf4ec483


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  f4ec483382e167469def497422dbb30fee5f5f32 (commit)
      from  0ffc4f3ebaace42cd545db55a2ac50b6e0cc7d89 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4ec483382e167469def497422dbb30fee5f5f32

commit f4ec483382e167469def497422dbb30fee5f5f32
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Oct 31 16:48:45 2011 -0400

    Unify getent output for initgroups database
    
    Requests for other fail if iteration is not supported and no parameters
    are given.  Do this for initgroups as well.

diff --git a/ChangeLog b/ChangeLog
index a000a92..83a64e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2011-10-31  Ulrich Drepper  <drepper@gmail.com>
 
+	[BZ #13367]
+	* nss/getent.c (initgroups_keys): Show error message in case no group
+	names are given.
+
 	* include/ifaddrs.h: Declare __free_in6ai and __bump_nl_timestamp.
 	* inet/check_pf.c: Provide dummy versions of __free_in6ai and
 	__bump_nl_timestamp.
diff --git a/NEWS b/NEWS
index 663c7ec..8c352e9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2011-10-29
+GNU C Library NEWS -- history of user-visible changes.  2011-10-31
 Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -12,7 +12,7 @@ Version 2.15
   6779, 6783, 9696, 10709, 11589, 12403, 12847, 12868, 12852, 12874, 12885,
   12892, 12907, 12922, 12935, 13007, 13021, 13067, 13068, 13090, 13092,
   13114, 13118, 13123, 13134, 13138, 13150, 13179, 13192, 13268, 13276,
-  13291, 13335, 13337, 13344, 13358
+  13291, 13335, 13337, 13344, 13358, 13367
 
 * New program pldd to list loaded object of a process
   Implemented by Ulrich Drepper.
diff --git a/nss/getent.c b/nss/getent.c
index 7d94223..0e39836 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -518,6 +518,12 @@ initgroups_keys (int number, char *key[])
   size_t grpslen = ngrps * sizeof (gid_t);
   gid_t *grps = alloca (grpslen);
 
+  if (number == 0)
+    {
+      fprintf (stderr, _("Enumeration not supported on %s\n"), "initgroups");
+      return 3;
+    }
+
   for (int i = 0; i < number; ++i)
     {
       int no = ngrps;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    4 ++++
 NEWS         |    4 ++--
 nss/getent.c |    6 ++++++
 3 files changed, 12 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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