public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* typo correction in grp.cc
@ 2014-06-06 17:08 Denis Excoffier
  2014-06-16  9:12 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Excoffier @ 2014-06-06 17:08 UTC (permalink / raw)
  To: cygwin-patches

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: typo correction in grp.cc
  2014-06-06 17:08 typo correction in grp.cc Denis Excoffier
@ 2014-06-16  9:12 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2014-06-16  9:12 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 1082 bytes --]

On Jun  6 19:08, Denis Excoffier wrote:
> 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.

Done.  Thanks a lot.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-16  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-06 17:08 typo correction in grp.cc Denis Excoffier
2014-06-16  9:12 ` Corinna Vinschen

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).