Package: release.debian.org
Severity: normal
User: release.debian....@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:


--
To UNSUBSCRIBE, email to debian-release-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/alpine.lrh.2.02.1302051628590.18...@sci.felk.cvut.cz

Reply via email to