Xref: utzoo comp.unix.wizards:15156 comp.bugs.sys5:814 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!xanth!ukma!tut.cis.ohio-state.edu!osu-cis!att!laidbak!stevea From: stevea@laidbak.UUCP (Steve Alexander) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: Re: setuid (euid) after setuid (uid) on System 5 Message-ID: <2162@laidbak.UUCP> Date: 21 Mar 89 22:50:45 GMT References: <123@cat.Fulcrum.BT.CO.UK> <822@pedsga.UUCP> Reply-To: stevea@laidbak.UUCP (Steve Alexander) Followup-To: comp.bugs.sys5 Organization: Lachman Associates, Inc. Naperville, IL Lines: 18 In article <822@pedsga.UUCP> jeffj@pedsga.UUCP writes: >Perhaps the saved-uid was erroneously set to the real UID? I believe that if the current effective id is root, the saved set-uid is set to the new uid along with the effective uid and the real uid when the setuid() is done. Thus, the following will not work: root -> user -> root This is only true for effective uid 0. Otherwise, the saved set-uid is left alone. For non-zero uid's, the setuid() proceeds if the new uid is equal to either the real uid or the saved set-uid. -- Steve Alexander, TCP/IP Development | stevea%laidbak@sun.com Lachman Associates, Inc. | ...!sun!laidbak!stevea