mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.
This commit is contained in:
parent
c7ddefc062
commit
a34b48abe5
@ -3737,9 +3737,7 @@ tryexec(char *cmd, char **argv, char **envp)
|
|||||||
#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
|
#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||||
if(find_applet_by_name(cmd) != NULL) {
|
if(find_applet_by_name(cmd) != NULL) {
|
||||||
/* re-exec ourselves with the new arguments */
|
/* re-exec ourselves with the new arguments */
|
||||||
execve("/proc/self/exe",argv,envp);
|
execve(CONFIG_BUSYBOX_EXEC_PATH,argv,envp);
|
||||||
/* If proc isn't mounted, try hardcoded path to busybox binary*/
|
|
||||||
execve("/bin/busybox",argv,envp);
|
|
||||||
/* If they called chroot or otherwise made the binary no longer
|
/* If they called chroot or otherwise made the binary no longer
|
||||||
* executable, fall through */
|
* executable, fall through */
|
||||||
}
|
}
|
||||||
|
@ -3306,8 +3306,7 @@ char *c, **v, **envp;
|
|||||||
/* We have to exec here since we vforked. Running
|
/* We have to exec here since we vforked. Running
|
||||||
* run_applet_by_name() won't work and bad things
|
* run_applet_by_name() won't work and bad things
|
||||||
* will happen. */
|
* will happen. */
|
||||||
execve("/proc/self/exe", v, envp);
|
execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
|
||||||
execve("busybox", v, envp);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user