Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Mon, 16 Apr 2001 16:22:08 +0200 From: Corinna Vinschen To: cygdev Subject: Patch to getgroups() Message-ID: <20010416162208.A20490@cygbert.vinschen.de> Reply-To: Corinna Vinschen Mail-Followup-To: cygdev Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Hi, I have changed the getgroups() function so that the behaviour changes when `ntsec' is on. In that case getgroups doesn't return the list of groups for which the user is added to /etc/groups (and the primary group of course) but instead getgroups() opens the process token and reads the group list of the process from there. Then the group is searched in /etc/groups by SID. If it's found, the Cygwin gid is added to the grouplist. That means, getgroups() now in fact returns the list of supplementary groups of the process as it's intended. All groups which are not found in /etc/groups are ignored. This are typically groups like: S-1-5-5-0-xxxxx The unique login SID S-1-2-0 LOCAL S-1-5-6 SERVICE S-1-5-11 Authenticated Users etc. Would you please give that change a try and look if it's ok or if there's a reason to drop it again, perhaps. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.