NOEXEC environment bug
Denys Vlasenko
vda.linux at googlemail.com
Fri Nov 3 13:18:18 UTC 2017
On Wed, Nov 1, 2017 at 8:50 PM, Ron Yorston <rmy at pobox.com> wrote:
> There's a related problem when SH_STANDALONE and SH_NOFORK are enabled:
> changed shell variables aren't visible to NOFORK applets. For example,
>
> $ ./busybox sh
> $ mkdir ~/mybin
> $ cp busybox ~/mybin/thing
> $ export PATH=~/mybin:$PATH
> $ which thing
> $
>
> If SH_NOFORK is disabled (or 'which' is not NOFORK):
>
> $ ./busybox sh
> $ export PATH=~/mybin:$PATH
> $ which thing
> /home/rmy/mybin/thing
> $
>
> Lots more applets have been made NOFORK recently, though at a quick
> glance I suspect most of them don't access environment variables.
> Obviously 'which' does. And 'printenv'.
Indeed, it's a bug. Fixed in git, thanks!
More information about the busybox
mailing list