whoami useless in setuid programs

Christopher A Kent cak at PURDUE.ARPA
Wed Nov 21 06:42:17 AEST 1984


Description:
	whoami returns the real user id, not the effective user id.
Repeat-By:
	create a setuid shell script and run whoami inside it.
Fix:
	Simple -- change the getuid() call in whoami.c to geteuid().
	Must have been overlooked in the 4.2 conversion.



More information about the Comp.unix.wizards mailing list