Subject: Re: setreuid() and setregid()
To: Greg Hudson <ghudson@MIT.EDU>
From: Greg A. Woods <>
List: tech-kern
Date: 05/26/1996 10:25:52
[ On Sat, May 25, 1996 at 15:46:51 (EDT), Greg Hudson wrote: ]
> Subject: Re: setreuid() and setregid() 
> > That depends on which "UNIX" model you're thinking of.  Only 4.2BSD
> > and newer BSDs allow a setuid-root process to temporarily become
> > another and euid and then return to euid==0.
> Not so.  Solaris 2.4, AIX 3.2.5, and IRIX 5.2 have seteuid(), HPUX
> 9.05 has setresuid(), and most of those systems also have setreuid()
> for compatibility with BSD 4.3.

Indeed, Solaris-2, and other(/all?) SysVr4's have added seteuid().  I'm
not quite sure how this system call is classified.  I don't have a copy
of the SVID-III to see what it has to say about why the call is there,
if indeed it is.

However on theoretical basis, the SysV "model" is indeed only defined by
the SVID, so if SVID Issue III doesn't mention seteuid(), then seteuid()
is a vendor extension, and cannot be considered part of the model.
(This is the kind of reverse psychology vendors use when explaining how
they meet various criteria!  ;-)

On that basis, I don't think you can state clearly which model any of
the others follow.

HP/UX was once upone a time somewhat 4BSD-featured, though based on the
SysV kernel, and all IRIX systems up to 5.x are so.  AIX is a complete
bastardisation of both kernels, though in an opposite sense to the way
Pyramid's OSx dual personality was put together.

Back to NetBSD.  Yes, I would say it truely follows the BSD model, and
no doubt any formal evaluation against POSIX would stick against this

							Greg A. Woods

+1 416 443-1734			VE3TCP			robohack!woods
Planix, Inc. <>; Secrets Of The Weird <>