[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r5485 - in glibc-package/branches/eglibc-2.17/debian: . patches patches/kfreebsd



Author: adconrad
Date: 2013-02-07 05:40:53 +0000 (Thu, 07 Feb 2013)
New Revision: 5485

Added:
   glibc-package/branches/eglibc-2.17/debian/patches/kfreebsd/local-initgroups-order.diff
Modified:
   glibc-package/branches/eglibc-2.17/debian/changelog
   glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-amd64
   glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-i386
Log:
Merge with unstable

Modified: glibc-package/branches/eglibc-2.17/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/changelog	2013-02-07 04:53:45 UTC (rev 5484)
+++ glibc-package/branches/eglibc-2.17/debian/changelog	2013-02-07 05:40:53 UTC (rev 5485)
@@ -598,6 +598,10 @@
   * debian/testsuite-checking/compare.sh: Disable failing the build on test
     regressions to ease the pain of ongoing stable/security maintenance.
 
+  [ Petr Salinger ]
+  * patches/kfreebsd/local-initgroups-order.diff: always put supplied extra
+    gid as the first entry of group list in setgroups(). Closes: #699593.
+
  -- Adam Conrad <adconrad@0c3.net>  Sun, 30 Dec 2012 10:22:43 -0700
 
 eglibc (2.13-38) unstable; urgency=low

Copied: glibc-package/branches/eglibc-2.17/debian/patches/kfreebsd/local-initgroups-order.diff (from rev 5484, glibc-package/trunk/debian/patches/kfreebsd/local-initgroups-order.diff)
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/kfreebsd/local-initgroups-order.diff	                        (rev 0)
+++ glibc-package/branches/eglibc-2.17/debian/patches/kfreebsd/local-initgroups-order.diff	2013-02-07 05:40:53 UTC (rev 5485)
@@ -0,0 +1,38 @@
+
+ setgroups(size, groups) changes egid on kfreebsd, 
+ precisely groups[0] is the new egid
+
+ initgroups(user, gid) prepares the "groups" list
+ via internal_getgrouplist(). 
+ It puts supplied gid as the first entry in all but NSCD cases.
+ Fix the remaining NSCD case, see #698102, #699593.
+
+
+--- a/nscd/nscd_initgroups.c
++++ b/nscd/nscd_initgroups.c
+@@ -145,15 +145,23 @@
+     }
+ 
+   /* Check whether GROUP is part of the mix.  If not, add it.  */
++  /* The GROUP have to be in the first entry */
+   if (retval >= 0)
+     {
+       int cnt;
++      gid_t sg, tg;
++      sg = group;
+       for (cnt = 0; cnt < retval; ++cnt)
+-	if ((*groupsp)[cnt] == group)
++      {
++        tg = (*groupsp)[cnt];
++        (*groupsp)[cnt] = sg;
++        if (tg == group)
+ 	  break;
++        sg = tg;
++      }  
+ 
+       if (cnt == retval)
+-	(*groupsp)[retval++] = group;
++	(*groupsp)[retval++] = sg;
+     }
+ 
+  out_close:

Modified: glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-amd64
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-amd64	2013-02-07 04:53:45 UTC (rev 5484)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-amd64	2013-02-07 05:40:53 UTC (rev 5485)
@@ -6,3 +6,4 @@
 kfreebsd/local-sys_queue_h.diff
 kfreebsd/local-undef-glibc.diff
 kfreebsd/local-use-thr-primitives.diff
+kfreebsd/local-initgroups-order.diff

Modified: glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-i386
===================================================================
--- glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-i386	2013-02-07 04:53:45 UTC (rev 5484)
+++ glibc-package/branches/eglibc-2.17/debian/patches/series.kfreebsd-i386	2013-02-07 05:40:53 UTC (rev 5485)
@@ -6,3 +6,4 @@
 kfreebsd/local-sys_queue_h.diff
 kfreebsd/local-undef-glibc.diff
 kfreebsd/local-use-thr-primitives.diff
+kfreebsd/local-initgroups-order.diff


Reply to: