Subject: Re: Linux emulation problems
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Giles Lean <giles@nemeton.com.au>
List: netbsd-help
Date: 06/07/2000 16:30:37
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.
Regards,
Giles