* typo correction (patch)
@ 2014-05-26 17:44 Denis Excoffier
0 siblings, 0 replies; only message in thread
From: Denis Excoffier @ 2014-05-26 17:44 UTC (permalink / raw)
To: Cygwin Mailing List
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-26 17:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-26 17:44 typo correction (patch) Denis Excoffier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).