X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:content-type:content-transfer-encoding :date:subject:to:message-id:mime-version; q=dns; s=default; b=gY 7k8WVSixPYArtQSmzMS7iUHzcjkegqs1WbQCNGyT+pY/Z89wcHxnOcdZXg2BbsnQ oK9yEj1WTQvTp7idBT1w6LEPCiFcZEkYy0hBDKtrPK8pwNVruzTpZT4TO0tD0gI0 RlKKSwb7V3jzx2fBA36Dv09/s8Y0F26ZwMT8OUEtI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:content-type:content-transfer-encoding :date:subject:to:message-id:mime-version; s=default; bh=mPi7N00x fYcNjL7DP1NrSkD3JqE=; b=EteYRZmFhobVvOj0/EkR5j93djoavxIsDUyAOAgT b8duOn2PVlk0FBN3gn4/hD1qD/GRYnq4x8p8esBNkUFWJHyX0QxlxZaSzBGyGM+o pDApwLVJ0bAqLEUqO3UZ+YcDdYqxHCm3z8ot/Jox7pjTFyvjQLuzoFj1HbqNkc0I DGg= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 From: Denis Excoffier Content-Type: text/plain; charset=us-ascii Date: Mon, 26 May 2014 19:28:46 +0200 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\)) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id s4QHT3dD022195 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