patch-pre2.0.3 linux/fs/binfmt_java.c

Next file: linux/fs/devices.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.2/linux/fs/binfmt_java.c linux/fs/binfmt_java.c
@@ -14,7 +14,10 @@
 
 #define _PATH_JAVA	"/usr/bin/java"
 #define _PATH_APPLET	"/usr/bin/appletviewer"
-#define _PATH_SH	"/bin/sh"
+#define _PATH_SH	"/bin/bash"
+
+char binfmt_java_interpreter[65] = _PATH_JAVA;
+char binfmt_java_appletviewer[65] = _PATH_APPLET;
 
 static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
 {
@@ -47,7 +50,7 @@
 	bprm->p = copy_strings(1, &i_name, bprm->page, bprm->p, 2);
 	bprm->argc++;
 
-	strcpy (bprm->buf, _PATH_JAVA);
+	strcpy (bprm->buf, binfmt_java_interpreter);
 	cp = bprm->buf;
 	bprm->p = copy_strings(1, &cp, bprm->page, bprm->p, 2);
 	bprm->argc++;
@@ -102,12 +105,12 @@
 	bprm->p = copy_strings(1, &i_name, bprm->page, bprm->p, 2);
 	bprm->argc++;
 
-	strcpy (bprm->buf, _PATH_APPLET);
+	strcpy (bprm->buf, binfmt_java_appletviewer);
 	cp = bprm->buf;
 	bprm->p = copy_strings(1, &cp, bprm->page, bprm->p, 2);
 	bprm->argc++;
 
-	strcpy (bprm->buf, _PATH_BSHELL);
+	strcpy (bprm->buf, _PATH_SH);
 	interp = bprm->buf;
 	if ((i_name = strrchr (bprm->buf, '/')) != NULL)
 		i_name++;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this