Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Wed, 22 Jan 2003 18:34:59 +0100 From: Corinna Vinschen To: Cygwin-Developers Subject: Re: setregid() and setreuid() implementation proposal Message-ID: <20030122173459.GM29236@cygbert.vinschen.de> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: Cygwin-Developers 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> <20030122172252 DOT GA628 AT tishler DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030122172252.GA628@tishler.net> User-Agent: Mutt/1.4i On Wed, Jan 22, 2003 at 12:22:52PM -0500, Jason Tishler wrote: > 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. "Otherwise". setuid, not seteuid in case of rgid == egid. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.