[net.unix-wizards] setuid help

tjr@ihnet.UUCP (Tom Roberts) (11/11/85)

About setuid in UNIX Sys V: any process that execs a setuid program file
can switch at will between the processes' real uid and the setuid of
the file. Thus, it can bounce between these two uid's as often as
necessary. This is an essentially undocumented feature os UNIX Sys V
(and derivatives, I hope).

	Tom Roberts
	AT&T Bell Laboratories
	ihnp4!ihnet!tjr

mike@whuxl.UUCP (BALDWIN) (11/12/85)

> About setuid in UNIX Sys V: any process that execs a setuid program file
> can switch at will between the processes' real uid and the setuid of
> the file. Thus, it can bounce between these two uid's as often as
> necessary. This is an essentially undocumented feature os UNIX Sys V
> (and derivatives, I hope).

Undocumented?  Please folks, read the manual:

SETUID(2)

	If the effective user ID of the calling process is not super-user,
	but the saved set-user (group) ID from exec(2) is equal to uid
	(gid), the effective user (group) ID is set to uid (gid).
-- 
						Michael Baldwin
						{at&t}!whuxl!mike