Fwd: NOFORK and NOEXEC without PREFER_APPLETS
Rob Landley
rob at landley.net
Wed Jul 20 20:15:58 UTC 2016
On 07/20/2016 08:01 AM, Bruno Chevalier wrote:
> Hi,
>
> I am wondering why FEATURE_PREFER_APPLETS needs to be enabled for the
> FEATURE_SH_STANDALONE (to do the NOEXEC trick) and FEATURE_SH_NOFORK (to
> do the NOFORK trick).
>
> If the applet tables would always contain the NOFORK/NOEXEC bits, the
> FEATURE_PREFER_APPLETS wouldn't be mandatory anymore.
> You can look in the path and if the executable that gets found for a
> specific command is busybox, then we can do the NOEXEC or NOFORK trick.
> Otherwise, we just execute the program that was found using PATH in the
> normal way.
>
> *_A use case for this is the following:_*
> Let's say we have 2 buildroot configurations.
> We als have one common busybox configuration that contains the hexdump
> applet and that gets used for both buildroot configurations.
As an aside, I note that the bash man page has the commands "builtin",
"command", "enable", and "type" that control this at runtime. (In the
case of enable, on a per-command level.) No obvious reason ash couldn't...
Rob
More information about the busybox
mailing list