From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8241 invoked by alias); 26 May 2014 17:28:51 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 8224 invoked by uid 89); 26 May 2014 17:28:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: smtp2-g21.free.fr Received: from smtp2-g21.free.fr (HELO smtp2-g21.free.fr) (212.27.42.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 May 2014 17:28:49 +0000 Received: from [192.168.0.13] (unknown [78.224.52.79]) by smtp2-g21.free.fr (Postfix) with ESMTP id B69804B00DD; Mon, 26 May 2014 19:26:44 +0200 (CEST) From: Denis Excoffier Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Mon, 26 May 2014 17:44:00 -0000 Subject: typo correction (patch) To: Cygwin Mailing List Message-Id: <40D05252-845E-4D45-BB34-D38CD45A1005@Denis-Excoffier.org> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) X-SW-Source: 2014-05/txt/msg00471.txt.bz2 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 i= s only 10). diff -uNr cygwin-snapshot-20140523-1.original/winsup/cygwin/grp.cc cygwin-s= napshot-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:0= 8:37.542897300 +0200 @@ -656,11 +656,11 @@ groups[cnt] =3D grp->gr_gid; ++cnt; } - *ngroups =3D cnt; if (cnt > *ngroups) ret =3D -1; else ret =3D cnt; + *ngroups =3D cnt; =20 syscall_printf ( "%d =3D getgrouplist(%s, %u, %p, %d)", ret, user, gid, groups, *ngroups); =20 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