typo correction (patch)
Denis Excoffier
cygwin@Denis-Excoffier.org
Mon May 26 17:44:00 GMT 2014
Hello,
I propose the following patch, in order to make getgrouplist() to produce a better result, in particular when the number of
groups of a user is more than the first value used by coreutils/id (which is only 10).
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);
Regards,
Denis Excoffier.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list