Subject: Re: Linux emulation problems
To: Giles Lean <giles@nemeton.com.au>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-users
Date: 06/07/2000 10:26:50
On Wed, Jun 07, 2000 at 04:30:37PM +1000, Giles Lean wrote:
> 
> On Mon, 5 Jun 2000 21:39:46 +0200  Manuel Bouyer wrote:
> 
> > >     9805 bash     RET   getuid 1859/0x743
> > >     9805 bash     CALL  #164 (unimplemented setresuid)
> > >     9805 bash     PSIG  SIGSYS SIG_DFL
> > >     9805 bash     NAMI  "bash.core"
> > 
> > Are you root when you're running this ?
> > I don't know what setresuid is supposed to do ...
> 
> On HP-UX it is a system call that simultaneously sets the real,
> effective, and saved user ids:
> 
> http://docs.hp.com:80/dynaweb/hpux11/hpuxen1a/rvl3en1a/@Generic__BookTocView/62553/*?DwebQuery=setresuid#X
> 
>     "setresuid() sets the real, effective and/or saved user ID of the
>      calling process.
> 
>     "If the current real, effective or saved user ID is equal to that
>      of a user having appropriate privileges, setresuid() sets the
>      real, effective and saved user IDs to ruid , euid , and suid ,
>      respectively. Otherwise, setresuid() only sets the real,
>      effective, and saved user IDs if ruid , euid , and suid each
>      match at least one of the current real, effective, or saved user
>      IDs.
> 
>     "If ruid , euid , or suid is -1, setresuid() leaves the current
>      real, effective or saved user ID unchanged."
> 
> I imagine the Linux code does the same thing, but I don't have Linux
> kernel source around to check.

If it does this is should'nt be hard to implement.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--