From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1549 invoked by alias); 22 Jan 2007 09:34:28 -0000 Received: (qmail 1538 invoked by uid 22791); 22 Jan 2007 09:34:27 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 22 Jan 2007 09:34:22 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id E9F716D4675; Mon, 22 Jan 2007 10:34:19 +0100 (CET) Date: Mon, 22 Jan 2007 09:34:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: "id -Gn" w/ username doesn't return all associated groups. Issue with getgrent()? Message-ID: <20070122093419.GR27843@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <001a01c73dae$7dec4af0$6152a8c0@ziesemermark> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001a01c73dae$7dec4af0$6152a8c0@ziesemermark> User-Agent: Mutt/1.4.2.2i 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 X-SW-Source: 2007-01/txt/msg00686.txt.bz2 On Jan 21 16:50, Mark A. Ziesemer wrote: > Cygwin doesn't appear to properly support returning multiple groups for a > specific user, other than the current user (and only when not specifying the > current user's username.) > > When "id" is called without a username, it calls the getgroups(...) function > which appears to work as expected. However, when a specific username is > passed, even the username of the current user, getugroups(...) is called, > and does _not_ appear to work as expected. That's by design. getgroups() has access to the user token of the current process and returns every group which is in this token. getgrent() is a function which enumerates /etc/groups. > I've setup a public wiki with all the details where I hope we can > collaborate to finally solve this issue: > http://cygwin-getugroups.pbwiki.com/ Included there are the requested > cygcheck and related files. The place to discuss Cygwin stuff is this mailing list. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/