[PATCH v5 6/9] ash: use BB_EXECVPE to execute commands with FEATURE_SH_STANDALONE

Ron Yorston rmy at pobox.com
Thu Jan 30 09:33:16 UTC 2025


Nadav Tasher <tashernadav at gmail.com> wrote:
>This change makes the standalone shell use the BB_EXECVPE utility.
>BB_EXECVPE calls BB_EXECVP which has NOEXEC and applets only logic.

Hold on, this isn't right.  In standalone shell mode BB_EXECVPE()
uses execvpe() to execute a command that isn't an applet, thus
resulting in a path search.

But the shell doesn't perform path lookup the same way as execvpe().
The shell's path lookup is handled by the explicit PATH search loop
in shellexec().  It shouldn't be preempted by a call to execvpe() in
tryexec().

Cheers,

Ron


More information about the busybox mailing list