Subject: Emulating Ultrix setuid semantics
To: Theo de Raadt <deraadt@fsa.ca>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 08/19/1994 17:35:38
>SunOS processes do not call setreuid(N, N). They call setuid() for
>that purpose.
On the other hand, Ultrix does.
>You keep providing a POSIX justification. That's invalid -- POSIX
>doesn't talk about implimenting setuid in terms of setreuid; because
>POSIX doesn't include setreuid.
I'm not providing a POSIX justfication, at least not directly.
I'm trying to say this:
* Ultrix does POSIX semantics for setuid() and setgid() at user level
* The underlying _MECHANISM_ they use is the Ultrix setre{gid,uid}()
system call
* I want NetBSD's ultrix emulation to be good enough to
use Ultrix' /bin/login. This /bin/login wants POSIX
semantics from libc.a's setuid() and setgid(). Specifically,
on Ultrix, login, running as rot, is a "sufficienlty privileged"
process to have real, effective, and saved uids set.
* If NetBSD is going to emulate Ultrix setuid semantics, it has to
emulate the Ultrix semantics of setreuid() and setreguid().
I don't seem to be able to communicate that. I don't understand why.
It's as if you think Ultrix setreuid() should have the same semantics
as SunOS, and it's broken because it doesn't.
>Still, it is an emulation problem. I've got a better solution now,
>which handles 3 of the 4 cases well.
Depending on which case you don't handle, that may or may not
be good enough.
------------------------------------------------------------------------------