aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-14 01:27:01 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-06-14 01:27:01 +0000
commit20c378722bce1149bf78f4588e5a6143b4a061a3 (patch)
treeaf3980cb1fc3ddea246f93d32d5d9f1dcb436b49 /shell
parent9a966ef1ffdb33434c5defaa61ceeab45cc29152 (diff)
downloadbusybox-w32-20c378722bce1149bf78f4588e5a6143b4a061a3.tar.gz
busybox-w32-20c378722bce1149bf78f4588e5a6143b4a061a3.tar.bz2
busybox-w32-20c378722bce1149bf78f4588e5a6143b4a061a3.zip
Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.
git-svn-id: svn://busybox.net/trunk/busybox@15381 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
-rw-r--r--shell/msh.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 713898a9f..a0eb4e36f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3737,9 +3737,7 @@ tryexec(char *cmd, char **argv, char **envp)
3737#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL 3737#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
3738 if(find_applet_by_name(cmd) != NULL) { 3738 if(find_applet_by_name(cmd) != NULL) {
3739 /* re-exec ourselves with the new arguments */ 3739 /* re-exec ourselves with the new arguments */
3740 execve("/proc/self/exe",argv,envp); 3740 execve(CONFIG_BUSYBOX_EXEC_PATH,argv,envp);
3741 /* If proc isn't mounted, try hardcoded path to busybox binary*/
3742 execve("/bin/busybox",argv,envp);
3743 /* If they called chroot or otherwise made the binary no longer 3741 /* If they called chroot or otherwise made the binary no longer
3744 * executable, fall through */ 3742 * executable, fall through */
3745 } 3743 }
diff --git a/shell/msh.c b/shell/msh.c
index 62e6b6e01..bd4b8fdb2 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -3306,8 +3306,7 @@ char *c, **v, **envp;
3306 /* We have to exec here since we vforked. Running 3306 /* We have to exec here since we vforked. Running
3307 * run_applet_by_name() won't work and bad things 3307 * run_applet_by_name() won't work and bad things
3308 * will happen. */ 3308 * will happen. */
3309 execve("/proc/self/exe", v, envp); 3309 execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
3310 execve("busybox", v, envp);
3311 } 3310 }
3312#endif 3311#endif
3313 3312