Xref: utzoo comp.unix.wizards:15191 comp.bugs.sys5:817 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!hc!lll-winken!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (Wm. E. Davidsen Jr) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: Re: setuid (euid) after setuid (uid) on System 5 Message-ID: <13416@steinmetz.ge.com> Date: 24 Mar 89 13:56:00 GMT References: <123@cat.Fulcrum.BT.CO.UK> <280@cbnewsc.ATT.COM> <1196@auspex.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 15 The setuid behavior gets to be a real pain in the case where a program is running setuid (not root) and needs to run another program to perform some task. The execed program runs with its uid and euid set to the uid rather than the euid, and there's no reasonable way to change this, such as setuid(geteuid()) in BSD. I hit this all the time on a BBS, where the bbs program runs setuid to the BBS uid, and a file transfer using a protocol program is to be done. I found a way by it, but it's ugly, and the only thing in the whole system which requires root permission (to install not run). -- bill davidsen (wedu@crd.GE.COM) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me