setuid (euid) after setuid (uid) on System 5

Steve Alexander stevea at laidbak.UUCP
Wed Mar 22 08:50:45 AEST 1989


In article <822 at pedsga.UUCP> jeffj at 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 at sun.com
Lachman Associates, Inc.            | ...!sun!laidbak!stevea



More information about the Comp.bugs.sys5 mailing list