This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Patch to getgroups()
- To: cygdev <cygwin-developers at cygwin dot com>
- Subject: Patch to getgroups()
- From: Corinna Vinschen <vinschen at redhat dot com>
- Date: Mon, 16 Apr 2001 16:22:08 +0200
- Reply-To: Corinna Vinschen <cygwin-developers at cygwin dot com>
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@cygwin.com
Red Hat, Inc.