Bourne | Ash |  #!  | find | ARG_MAX | Shells | whatshell | portability | permissions | UUOC | ancient | - | ../Various | HOME
"$@" | echo/printf | set -e | test | tty defs | tty chars | $() vs ) | IFS | using siginfo | nanosleep | line charset | locale


I am glad to have found the following in the CSRG Archive CD-ROMs.

The following was released under the licenses of BSD and Caldera.

Here are extracts from 4.4BSD /usr/src/sys/kern/kern_exec.c:



 *	@(#)kern_exec.c	8.1 (Berkeley) 6/10/93

[...]

execve(p, uap, retval) [...]
{

	[...]
	switch ((int)exdata.ex_exec.a_magic) {
	[...]
	default:
		if (exdata.ex_shell[0] != '#' ||
		    exdata.ex_shell[1] != '!' ||
		    indir) {
			error = ENOEXEC;
			goto bad;
		}
		[...]
		uid = cred->cr_uid;	/* shell scripts can't be setuid */
		gid = cred->cr_gid;