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


Corinna,

On Wed, Jan 22, 2003 at 11:48:19AM +0100, Corinna Vinschen wrote:
> My tiny extension:
> 
>     if (rgid != -1)
>       if (rgid == egid)
>         return setuid (rgid);
>       ERROR;
>     return setegid (egid);

I thought that you meant something like the above, but I was concerned
I was missing something.

I plan on using the following:

    if (rgid != -1 && rgid != egid)
      {
        set_errno (EINVAL);
        return -1;
      }

    return setegid (egid);

unless I hear otherwise.

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6


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