Xref: utzoo comp.unix.wizards:15227 comp.bugs.sys5:824 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: Re: setuid (euid) after setuid (uid) on System 5 Message-ID: <16538@mimsy.UUCP> Date: 26 Mar 89 05:27:19 GMT References: <123@cat.Fulcrum.BT.CO.UK> <280@cbnewsc.ATT.COM> <1196@auspex.UUCP> <9915@smoke.BRL.MIL> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 17 >In article <1196@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: >>Both BSD and S5 flavors of "setuid" can be implemented atop "setreuid". In article <9915@smoke.BRL.MIL> gwyn@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@mimsy.umd.edu Path: uunet!mimsy!chris