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.17-469-g7a86be6


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  7a86be6e5f18ba99b25d75c555ce56fe1fcea325 (commit)
      from  1728ab378ef2302aaaf921f6109dbb6d30659c88 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7a86be6e5f18ba99b25d75c555ce56fe1fcea325

commit 7a86be6e5f18ba99b25d75c555ce56fe1fcea325
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Thu Mar 28 11:45:47 2013 +0530

    Don't add input group during initgroups_dyn in hesiod
    
    Fixes BZ #15304.
    
    The *initgroups_dyn functions are called with a group argument.  This
    group gid is usually skipped while populating the grouplist since the
    caller adds that group id in advance.
    
    The hesiod initgroups_dyn implementation however adds the group gid to
    the list if it does not already exist.  While it works fine for the
    usual initgroups, it breaks nscd since it calls initgroups_dyn with -1
    as the gid (to have all groups included).

diff --git a/ChangeLog b/ChangeLog
index 9a8bab6..7c1543c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-03-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+	[BZ #15304]
+	* hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_initgroups_dyn):
+	Don't add gid passed as argument.
+
 	* sysdeps/ieee-754/dbl-64/e_atan2.c: Reformat.
 
 2013-03-27  Joseph Myers  <joseph@codesourcery.com>
diff --git a/NEWS b/NEWS
index 11c79bb..0902478 100644
--- a/NEWS
+++ b/NEWS
@@ -12,7 +12,7 @@ Version 2.18
   11120, 11561, 12723, 13550, 13889, 13951, 14142, 14176, 14200, 14317,
   14327, 14496, 14812, 14920, 14964, 14981, 14982, 14985, 14994, 14996,
   15003, 15006, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15160,
-  15232, 15234, 15283, 15285, 15287, 15307.
+  15232, 15234, 15283, 15285, 15287, 15304, 15307.
 
 * Add support for calling C++11 thread_local object destructors on thread
   and program exit.  This needs compiler support for offloading C++11
diff --git a/hesiod/nss_hesiod/hesiod-grp.c b/hesiod/nss_hesiod/hesiod-grp.c
index c2ae166..b11952f 100644
--- a/hesiod/nss_hesiod/hesiod-grp.c
+++ b/hesiod/nss_hesiod/hesiod-grp.c
@@ -191,33 +191,6 @@ _nss_hesiod_initgroups_dyn (const char *user, gid_t group, long int *start,
       return errno == ENOENT ? NSS_STATUS_NOTFOUND : NSS_STATUS_UNAVAIL;
     }
 
-  if (!internal_gid_in_list (groups, group, *start))
-    {
-      if (__builtin_expect (*start == *size, 0))
-	{
-	  /* Need a bigger buffer.  */
-	  gid_t *newgroups;
-	  long int newsize;
-
-	  if (limit > 0 && *size == limit)
-	    /* We reached the maximum.  */
-	    goto done;
-
-	  if (limit <= 0)
-	    newsize = 2 * *size;
-	  else
-	    newsize = MIN (limit, 2 * *size);
-
-	  newgroups = realloc (groups, newsize * sizeof (*groups));
-	  if (newgroups == NULL)
-	    goto done;
-	  *groupsp = groups = newgroups;
-	  *size = newsize;
-	}
-
-      groups[(*start)++] = group;
-    }
-
   save_errno = errno;
 
   p = *list;

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

Summary of changes:
 ChangeLog                      |    4 ++++
 NEWS                           |    2 +-
 hesiod/nss_hesiod/hesiod-grp.c |   27 ---------------------------
 3 files changed, 5 insertions(+), 28 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]