Corinna,

I believe this will take care of Re: uh oh [[EMAIL PROTECTED]:
 Re: bash broken with cygwin 1.3.20? - now working with 1.3.20]

Pierre

2003-02-17  Pierre Humblet  <[EMAIL PROTECTED]>

        * grp.cc (internal_getgroups): Handle properly tokens with
        no groups. Fix bug introduced on 2003-02-04. 


Index: grp.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/grp.cc,v
retrieving revision 1.77
diff -u -p -r1.77 grp.cc
--- grp.cc      6 Feb 2003 14:01:53 -0000       1.77
+++ grp.cc      17 Feb 2003 19:19:31 -0000
@@ -267,7 +267,6 @@ internal_getgroups (int gidsetsize, __gi
                  for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
                    if ((cnt = (*srchsid == groups->Groups[pg].Sid)))
                      break;
-                 cnt = -1;
                }
              else
                for (int gidx = 0; (gr = internal_getgrent (gidx)); ++gidx)
@@ -293,8 +292,7 @@ internal_getgroups (int gidsetsize, __gi
        debug_printf ("%d = GetTokenInformation(NULL) %E", size);
       if (hToken != cygheap->user.token)
        CloseHandle (hToken);
-      if (cnt)
-       return cnt;
+      return cnt;
     }
 
   gid = myself->gid;

Reply via email to