summaryrefslogtreecommitdiffstats
path: root/sys/kern/imgact_shell.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2000-04-26 20:58:40 +0000
committerdillon <dillon@FreeBSD.org>2000-04-26 20:58:40 +0000
commitce08285d5ac062de6a96e6491313b81bea80ecaa (patch)
tree9c48fa81d6c9503f7a1fd3b5440dc0d58696221e /sys/kern/imgact_shell.c
parentc816580dfb530d84c2396d9f0d10a9f8e44d4ea4 (diff)
downloadFreeBSD-src-ce08285d5ac062de6a96e6491313b81bea80ecaa.zip
FreeBSD-src-ce08285d5ac062de6a96e6491313b81bea80ecaa.tar.gz
Fix #! script exec under linux emulation. If a script is exec'd from a
program running under linux emulation, the script binary is checked for in /compat/linux first. Without this patch the wrong script binary (i.e. the FreeBSD binary) will be run instead of the linux binary. For example, #!/bin/sh, thus breaking out of linux compatibility mode. This solves a number of problems people have had installing linux software on FreeBSD boxes.
Diffstat (limited to 'sys/kern/imgact_shell.c')
-rw-r--r--sys/kern/imgact_shell.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/imgact_shell.c b/sys/kern/imgact_shell.c
index 78479da..a15b56c 100644
--- a/sys/kern/imgact_shell.c
+++ b/sys/kern/imgact_shell.c
@@ -39,15 +39,11 @@
#define SHELLMAGIC 0x2321
#endif
-#define MAXSHELLCMDLEN 64
-
-static int exec_shell_imgact __P((struct image_params *imgp));
-
/*
* Shell interpreter image activator. A interpreter name beginning
* at imgp->stringbase is the minimal successful exit requirement.
*/
-static int
+int
exec_shell_imgact(imgp)
struct image_params *imgp;
{
OpenPOWER on IntegriCloud