[PATCH v5 9/9] httpd: disable execv call when applets are forced
Nadav Tasher
tashernadav at gmail.com
Wed Jan 29 23:36:20 UTC 2025
Since httpd needs to execute a binary, we would not like
it to succeed when busybox is configured not to execute
external binaries.
Signed-off-by: Nadav Tasher <tashernadav at gmail.com>
---
networking/httpd.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/networking/httpd.c b/networking/httpd.c
index ddcb03bca..872bab6b5 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1703,10 +1703,12 @@ static void send_cgi_and_exit(
| (1 << SIGHUP)
, SIG_DFL);
+#if !(ENABLE_FEATURE_PREFER_APPLETS && ENABLE_FEATURE_FORCE_APPLETS)
/* _NOT_ execvp. We do not search PATH. argv[0] is a filename
* without any dir components and will only match a file
* in the current directory */
execv(argv[0], argv);
+#endif
if (verbose)
bb_perror_msg("can't execute '%s'", argv[0]);
error_execing_cgi:
--
2.43.0
More information about the busybox
mailing list