This is the mail archive of the cygwin-patches 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: [Patch] Allow to disable root privileges with CYGWIN=noroot


On Oct 13 06:01, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> According to Christian Franke on 10/11/2009 2:45 PM:
> > 2009-10-11  Christian Franke  <franke@computer.org>
> >            Corinna Vinschen  <corinna@vinschen.de>
> > 
> >     * include/sys/cygwin.h: Add new cygwin_getinfo_type
> >     CW_SET_EXTERNAL_TOKEN.
> >     Add new enum CW_TOKEN_IMPERSONATION, CW_TOKEN_RESTRICTED.
> 
> Shouldn't we also bump version.h when adding new CW_ flags?

You're right.  Done in CVS.

> > +      case CW_SET_EXTERNAL_TOKEN:
> > +	{
> > +	  HANDLE token = va_arg (arg, HANDLE);
> > +	  int type = va_arg (arg, int);
> > +	  set_imp_token (token, type);
> > +	  return 0;
> > +	}
> 
> Not the first time this is done in this function.  But generally,
> shouldn't we follow the good practice of using va_end any time we used
> va_arg, in case cygwin is ever ported to a system where va_end is more
> than a no-op?  [At least, I'm assuming that __builtin_va_end() is a no-op
> for x86?]

That's probably a good idea, given that POSIX requires the usage of
va_end.  PTC?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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