setuid/getuid
utzoo!decvax!ucbvax!unix-wizards
utzoo!decvax!ucbvax!unix-wizards
Thu Oct 15 23:13:12 AEST 1981
>From jeff at lll-unix Thu Oct 15 22:04:24 1981
We too have run into the problem of needing a setuid program
to create a file as the real user and not as the effective user AND
then continue to run as the effective user. Setuid(getuid()) is
good but once.
To solve this we added a 'resex' system call that enables
a program to RESet its real and effective ids to EXec status.
Also,
a companion to being able to reset the real user and group ids
to what they were on an exec, is the ability to set the
real uid and gid from the effective ids (the compliment to
the current setuid/setgid). We called this 'setre', SET the
Real id from the Effective id.
This call is used for making setuid programs, and all of their children,
take on all of the characteristics, real and effective,
of the setuid/setgid user.
lll-unix runs V6.
More information about the Comp.unix.wizards
mailing list