This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
typo correction in grp.cc
- From: Denis Excoffier <cygwin at Denis-Excoffier dot org>
- To: cygwin-patches at cygwin dot com
- Date: Fri, 6 Jun 2014 19:08:04 +0200
- Subject: typo correction in grp.cc
- Authentication-results: sourceware.org; auth=none
Hello,
The following patch (or equivalent) is needed in order for /usr/bin/id to return the full set of groups
in case the user given as argument belongs to more than 10 groups:
diff -uNr cygwin-snapshot-20140523-1.original/winsup/cygwin/grp.cc cygwin-snapshot-20140523-1.patched/winsup/cygwin/grp.cc
--- cygwin-snapshot-20140523-1.original/winsup/cygwin/grp.cc 2014-05-23 12:31:13.000000000 +0200
+++ cygwin-snapshot-20140523-1.patched/winsup/cygwin/grp.cc 2014-05-26 15:08:37.542897300 +0200
@@ -656,11 +656,11 @@
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);
Please apply.
Regards,
Denis Excoffier.