setgroups

Corinna Vinschen cygwin-patches@cygwin.com
Fri Jul 26 12:49:00 GMT 2002


On Fri, Jul 26, 2002 at 09:39:52AM -0400, Pierre A. Humblet wrote:
> The idea is that setgroups finds the group sids in /etc/group and stores 
> them in a structure in cygheap->user. That structure must be cmalloc'ed,
> hence the new class. The primary group sid is also stored there,
> which requires minor changes in internal_getlogin and setegid.
> setgroups returns an error if sids are not in /etc/group.
> 
> When seteuid is called, create_token checks if setgroups was called. 
> + If not, it does exactly as before and calls the former get_group_sidlist, 
> which is broken into get_initgroups_sidlist and get_token_group_sidlist
> for software reuse reasons (see below).
> + If setgroups has been called, create_token calls get_setgroups_sidlist,
> which copies the group sids from the cygheap to the temporary cygsidlist
> and which also calls get_token_group_sidlist (reuse software).
> 
> Sorry if this is too terse, I'd be happy to answer more questions.

No, that's perfectly ok.  Hmm, somehow I'd still wish to avoid two
implementations of sidlists...

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.



More information about the Cygwin-patches mailing list