delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/04/16/10:22:53

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <vinschen AT redhat DOT com>
To: cygdev <cygwin-developers AT cygwin DOT com>
Subject: Patch to getgroups()
Message-ID: <20010416162208.A20490@cygbert.vinschen.de>
Reply-To: Corinna Vinschen <cygwin-developers AT cygwin DOT com>
Mail-Followup-To: cygdev <cygwin-developers AT cygwin DOT com>
Mime-Version: 1.0
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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019