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

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: Fri, 17 Jan 2003 13:01:31 +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: <20030117120131.GF1142@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>
Mime-Version: 1.0
In-Reply-To: <20030116190119.GD820@tishler.net>
User-Agent: Mutt/1.4i

On Thu, Jan 16, 2003 at 02:01:19PM -0500, Jason Tishler wrote:
> Is the following simplistic setregid() implementation acceptable?
> 
>     extern "C" int
>     setregid (__gid16_t rgid, __gid16_t egid)
>     {
>       if (rgid != -1)
>         {
>           set_errno (EINVAL);
>           return -1;
>         }
>       return setegid (egid);
>     }
> 
> And, likewise for setreuid()?
> 
> If so, then I will submit the corresponding patch.

I think it's a start...  but I would appreciate if you implement
the appropriate setre[ug]id32 calls plus the setre[ug]id wrapper.

What about

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

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