This is the mail archive of the cygwin-patches@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]
Other format: [Raw text]

Re: exec after seteuid


On Mon, Jun 09, 2003 at 01:15:32PM -0400, Pierre A. Humblet wrote:
> Corinna Vinschen wrote:
> > 
> > On Mon, Jun 09, 2003 at 12:43:13PM -0400, Pierre A. Humblet wrote:
> > > Corinna Vinschen wrote:
> > > > it changes the impersonated access token if priv_gid is in the group
> > > > list of the new users token.
> > >
> > > Nope. The token is only changed by set(e)uid(), never by set(e)gid().
> > > Set(e)gid only changes the default group in the token, not the token
> > > itself (that's your design, or perhaps even older, and it's just fine).
> > 
> > There's SetTokenInformation(TokenPrimaryGroup) called in setegid32.
> 
> Yes, but it's a misleading name. It only affects the (default) group of
> files created by Windows programs launched by Cygwin.
> Also, starting with Win2000, such a call will fail in the case when the
> group given as argument is not in the token groups.

I must admit that I can't reproduce the situation.  A few hours ago I
had the case that the final setuid created a new passwordless token,
using your login code!  Now that I'm testing again, it doesn't occur.
I hate when something like this happens :-(

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]