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]
Other format: [Raw text]

Re: setregid() and setreuid() implementation proposal


Hi Jason,

On Tue, Jan 21, 2003 at 01:31:06PM -0500, Jason Tishler wrote:
> But, the above does not handle the following:
> 
>     setregid(-1, gid);
> 
> which is the motivation for this patch.

this was just an excerpt, sorry for being unclear.

Your code:

    if (rgid != -1)
      ERROR;
    return setegid (egid);

My tiny extension:

    if (rgid != -1)
      if (rgid == egid)
        return setuid (rgid);
      ERROR;
    return setegid (egid);

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]