double setuid programs

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Thu Oct 15 23:32:12 AEST 1981


>From Mike.Accetta at CMU-10A Thu Oct 15 20:34:13 1981
Mark,

    setuid(geteuid()) has been allowed (in VM/UNIX at least) for as
long as I can remember.  Note the second line of setuid(2) in the 4.0/1
manual: 

	"... These calls are only permitted to the super-user or if the
	argument is the real or effective ID."

Checking back to the original 32V manual does reveal that this is
indeed not the case in 32V.  I have actually used setuid(geteuid()) for
purposes similar to what you mention and have come across no problems
(a swap effective/real id call would still be nice, though).

				- Mike



More information about the Comp.unix.wizards mailing list