← Commit list

a34b48abe

Rob Landley
Rob Landley
2006-06-14
SOURCE BUG Duration: 36s

Subject

Upgrade the standalone shell code to use CONFIG_BUSYBOX_EXEC_PATH.

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+1 -3
@@ -3737,9 +3737,7 @@ tryexec(char *cmd, char **argv, char **envp)
#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
if(find_applet_by_name(cmd) != NULL) {
/* re-exec ourselves with the new arguments */
- execve("/proc/self/exe",argv,envp);
- /* If proc isn't mounted, try hardcoded path to busybox binary*/
- execve("/bin/busybox",argv,envp);
+ execve(CONFIG_BUSYBOX_EXEC_PATH,argv,envp);
/* If they called chroot or otherwise made the binary no longer
* executable, fall through */
}
shell/msh.c+1 -2
@@ -3306,8 +3306,7 @@ char *c, **v, **envp;
/* We have to exec here since we vforked. Running
* run_applet_by_name() won't work and bad things
* will happen. */
- execve("/proc/self/exe", v, envp);
- execve("busybox", v, envp);
+ execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
}
#endif