setuid (euid) after setuid (uid) on System 5

Chris Torek chris at mimsy.UUCP
Sun Mar 26 15:27:19 AEST 1989


>In article <1196 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
>>Both BSD and S5 flavors of "setuid" can be implemented atop "setreuid".

In article <9915 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>I don't think the "saved set-UID" feature can be emulated using setreuid().

If you are willing to substitute your own getuid(), geteuid(), and
access() for the `real' versions, it can.  (Obviously you also have
to substitute setuid and seteuid.)

In any case, Mike K. has talked about having 4.4 have `saved setuid
done right'.  The real problem with the SysV version is that it
overloads setuid(), and can tell `set all IDs including saved effective
uid' from `set real and effective uid' only when the caller is not root.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.bugs.sys5 mailing list