Brian May <br...@microcomaustralia.com.au> writes: > On 26 September 2014 12:08, Russ Allbery <r...@debian.org> wrote: >> >> I think you have that backwards, don't you? Shouldn't that be: >> >> echo='() { /bin/echo bar; }' sudo bash
> I think sudo treats both as the same/similar thing. That would surprise me. In one case, you're setting an environment variable and then running sudo. In the other case, you're telling sudo to run the command "echo='() { /bin/echo bar; }' echo foo" via a shell. In other words, with your original command, the actual command that you're running with sudo is probably something like: /bin/bash -e "echo='() { /bin/echo bar; }' echo foo" and sudo itself never sees your environment setting. sudo controls whether it's willing to pass arbitrary environment variables to the command it runs with the env_reset, env_keep, and env_check options. -- Russ Allbery (r...@debian.org) <http://www.eyrie.org/~eagle/> -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87tx3vnhjm....@hope.eyrie.org