--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: pre-approval for unblock: eglibc change restricted for GNU/kFreeBSD
- From: Petr Salinger <Petr.Salinger@seznam.cz>
- Date: Tue, 5 Feb 2013 16:45:20 +0100 (CET)
- Message-id: <alpine.LRH.2.02.1302051628590.18899@sci.felk.cvut.cz>
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please pre-approve following change for eglibc.
The rationale is that 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.
The patch fixes the remaining NSCD case.
The change will be restricted for GNU/kFreeBSD build,
it is not yet uploaded. The original submitter of bug (#698102, #699593)
confirms, that it fixes his situation. In his setup, one supplementary 
group got lost.
The fix is prepared in pkg-glibc repository as r5481.
Please decide, whether it could be allowed during next eglibc (wheezy) upload.
Thanks
	Petr
http://anonscm.debian.org/viewvc/pkg-glibc?view=revision&revision=5481
--- 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:
--- End Message ---
--- Begin Message ---
On Tue, 2014-01-21 at 12:23 -0700, Adam Conrad wrote:
> On Tue, Jan 21, 2014 at 06:52:31PM +0000, Adam D. Barratt wrote:
> > 
> > I suspect all of the changes made it in to the 2.13-38+deb7u1 upload,
> > but confirmation of that would be appreciated.
> 
> Yeah, I'm inclined to say that upload covered everything that mattered.
> 
> I believe all that was culled was Hurd stuff, and the Hurd guys tend to
> not care terribly much about stables anyway and focus entirely on sid,
> so that works.
In which case, let's go with #731512 to cover the changes.
Cheers,
Adam
--- End Message ---