public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Denis Excoffier <cygwin@Denis-Excoffier.org>
To: cygwin-patches@cygwin.com
Subject: typo correction in grp.cc
Date: Fri, 06 Jun 2014 17:08:00 -0000	[thread overview]
Message-ID: <1EB3586B-FB0E-4DA3-8790-9964C54B0D81@Denis-Excoffier.org> (raw)

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.

             reply	other threads:[~2014-06-06 17:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 17:08 Denis Excoffier [this message]
2014-06-16  9:12 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1EB3586B-FB0E-4DA3-8790-9964C54B0D81@Denis-Excoffier.org \
    --to=cygwin@denis-excoffier.org \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).