Greg Wooledge wrote:
On Thu, Jul 31, 2014 at 04:45:20PM -0700, Linda Walsh wrote:
Also noticing broken-ness upon using "sudo": functions are undefined...

Some implementations of sudo clear the environment before elevating
privileges.  Clearing the environment would also remove exported
functions, which are encoded as environment variables.  You might be
able to configure sudo to preserve your environment, but doing so is
well beyond the scope of bug-bash.
---
The note in says there are two ways to deal with
environment variables, "reset" w/whitelist or
no-reset w/blacklist.  Then it tells you:
"In all cases, environment variables with a value beginning with () are
     removed as they could be interpreted as bash functions. "

sudo is seriously broken in this regard, though I can't
see where / when this change went in (i.e. quite possibly,
been there, and my auto-scripted files reread in the definitions).



Reply via email to