* grp.cc (getgrouplist): Fix setting ngroups to make sure to return
the right value.
This commit is contained in:
parent
84600df21d
commit
6681d11fd3
|
@ -1,3 +1,8 @@
|
|||
2014-06-16 Denis Excoffier <cygwin@Denis-Excoffier.org>
|
||||
|
||||
* grp.cc (getgrouplist): Fix setting ngroups to make sure to return
|
||||
the right value.
|
||||
|
||||
2014-06-05 Christopher Faylor <me.cygwin2014@cgf.cx>
|
||||
|
||||
* timer.cc (timer_tracker::cancel): Demote api_fatal to system_printf,
|
||||
|
|
|
@ -656,11 +656,11 @@ getgrouplist (const char *user, gid_t gid, gid_t *groups, int *ngroups)
|
|||
groups[cnt] = grp->gr_gid;
|
||||
++cnt;
|
||||
}
|
||||
*ngroups = cnt;
|
||||
if (cnt > *ngroups)
|
||||
ret = -1;
|
||||
else
|
||||
ret = cnt;
|
||||
*ngroups = cnt;
|
||||
|
||||
syscall_printf ( "%d = getgrouplist(%s, %u, %p, %d)",
|
||||
ret, user, gid, groups, *ngroups);
|
||||
|
|
Loading…
Reference in New Issue