This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to getgroups()


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]