tip bug fix

Ian Donaldson rcodi at yabbie.rmit.oz
Sun May 8 17:34:59 AEST 1988


>From article <1160 at cadre.dsl.PITTSBURGH.EDU>, by jack at cadre.dsl.PITTSBURGH.EDU (Jack Nelson):
> Index:	/usr/src/usr.bin/tip/cmds.c  2.10BSD
> 
> Description:
> 	tip(1) will not properly run a shell if the environment
> 	SHELL is /bin/csh or /bin/tcsh.
 ...
> Fix:
> 	Description of how to fix the problem:
> 	patch cmds.c to use the "-b" option as documented in csh(1) to
> 	be necessary when you run setuid and try to fork a csh.

No!  That is definitely NOT the fix.  You should instead do a:

	setuid(getuid());
	setgid(getgid());

before you exec the shell!!
(same bug in 4.3bsd tip)

Ian D



More information about the Comp.bugs.2bsd mailing list