Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!oliveb!ames!killer!rpp386!jfh From: jfh@rpp386.Dallas.TX.US (John F. Haugh II) Newsgroups: comp.unix.wizards Subject: Re: setuid (euid) after setuid (uid) on Message-ID: <13854@rpp386.Dallas.TX.US> Date: 22 Mar 89 09:35:28 GMT References: <123@cat.Fulcrum.BT.CO.UK> <1800008@spdyne> Reply-To: jfh@rpp386.Dallas.TX.US (John F. Haugh II) Organization: River Parishes Programming, Dallas TX Lines: 22 In article <1800008@spdyne> root@spdyne.UUCP writes: > I know that on BSD they added a very useful call: setreuid, which >allows the setting of both real and effective uid. [I'm pretty sure that >I got that name right, but it's been 4 years since I did anything with BSD] >I seem to remember a fantastic call that switched your uid and euid! This >was a VERY good idea on someone's part! setreuid() allows you to specify both the real and the effective UID's separately. The syntax from the manpage is setreuid (ruid, euid) int ruid, euid; where ruid and euid are the real and effective UID's respectively. This system call only allows you to change the effective UID to the real UID, unless you are root. -- John F. Haugh II +-Quote of the Week:------------------- VoiceNet: (214) 250-3311 Data: -6272 | "Do not drink and bake" InterNet: jfh@rpp386.Dallas.TX.US | -- Arnold Swartzenegger UucpNet : !killer!rpp386!jfh +--------------------------------------