setuid (euid) after setuid (uid) on

root at spdyne.UUCP root at spdyne.UUCP
Sun Mar 26 10:31:00 AEST 1989


In article <1196 at auspex.UUCP> guy at 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 at spdyne.... Or chert at spdyne if you are setuid...:-)



More information about the Comp.unix.wizards mailing list