On Wed, 22 Jan 2025, Nadav Tasher wrote:

When FEATURE_FORCE_APPLETS is enabled, BB_EXECVP will
fail when trying to execute things that are not busybox
applets. This allows more control over the executed
processes.
...
+int FAST_FUNC BB_EXECVPE(const char *file, char *const argv[], char *const 
envp[])
+{
+       clearenv();
+       while (*envp)
+               putenv(*envp++);
+
+       return BB_EXECVP(file, argv);
+}

BB_EXECVPE can return an error and leave the environ of the caller altered,
which is a bit different to execvpe(). Maybe it can be switched around so that
BB_EXECVP() calls BB_EXECVPE() with a null envp.

This patchset is a very interesting feature, by the way.
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to