keith@seismo.CSS.GOV (Keith Bostic) (11/08/85)
Subject: Executable shell scripts can crash the system.
Index: sys/sys1.c 2.9BSD
Description:
Kernel doesn't check for more than one level of executable
shell scripts.
Repeat-By:
Execute "see" or any shell program that executes another shell
script.
Fix:
Apply the following diff.
sys1.c.right << >> sys1.c.wrong
75,76c76,77
< goto bad; /* check if script. one level only */
< if (!indir && u.u_exdata.ux_shell[0] == '#' && u.u_exdata.ux_shell[1] == '!') {
---
> goto bad; /* check if script. one level only */
> if (u.u_exdata.ux_shell[0] == '#' && u.u_exdata.ux_shell[1] == '!') {