NOEXEC environment bug

Ron Yorston rmy at pobox.com
Wed Nov 1 19:50:29 UTC 2017


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'.

Ron


More information about the busybox mailing list