delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/01/22/12:17:17

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Wed, 22 Jan 2003 12:22:52 -0500
From: Jason Tishler <jason AT tishler DOT net>
Subject: Re: setregid() and setreuid() implementation proposal
In-reply-to: <20030122104819.GC29236@cygbert.vinschen.de>
To: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
Mail-followup-to: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
Message-id: <20030122172252.GA628@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.4i
References: <20030116190119 DOT GD820 AT tishler DOT net>
<20030117120131 DOT GF1142 AT cygbert DOT vinschen DOT de>
<20030121183105 DOT GA2128 AT tishler DOT net>
<20030122104819 DOT GC29236 AT cygbert DOT vinschen DOT de>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019