www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/01/22/05:48:23

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 11:48:19 +0100
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
Subject: Re: setregid() and setreuid() implementation proposal
Message-ID: <20030122104819.GC29236@cygbert.vinschen.de>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: Cygwin-Developers <cygwin-developers AT cygwin DOT com>
References: <20030116190119 DOT GD820 AT tishler DOT net> <20030117120131 DOT GF1142 AT cygbert DOT vinschen DOT de> <20030121183105 DOT GA2128 AT tishler DOT net>
Mime-Version: 1.0
In-Reply-To: <20030121183105.GA2128@tishler.net>
User-Agent: Mutt/1.4i

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 AT cygwin DOT com
Red Hat, Inc.

- Raw text -


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