Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!killer!rpp386!spdyne!root From: root@spdyne.UUCP Newsgroups: comp.unix.wizards Subject: Re: setuid (euid) after setuid (uid) on Message-ID: <1800009@spdyne> Date: 26 Mar 89 00:31:00 GMT References: <123@cat.Fulcrum.BT.CO.UK> Lines: 20 Nf-ID: #R:cat.Fulcrum.BT.CO.UK:123:spdyne:1800009:000:685 Nf-From: spdyne.UUCP!root Mar 25 18:31:00 1989 In article <1196@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: >Both BSD and S5 flavors of "setuid" can be implemented atop "setreuid". How about: setuid (id); /* old method, not of much use... */ setruid (real uid); /* ONLY change the real uid */ seteuid (Eff uid); /* ONLY change the effective uid */ setsuid (Saved - Set-uid); /* ONLY change the saved set-uid */ This would enable people to write easy to follow, easy to write programs that run setuid and do I/O that runs as the original user. None of this Junk about root being special... -Chert Pellett root@spdyne.... Or chert@spdyne if you are setuid...:-)