Re: The correct way to use "for" without polluting the environment

2015-03-07 Thread Alan Wild
I'm really curious to see if anyone else offers better ideas, but the ways I've done this are 1) exactly what you propose. 2) use a subshell (parantheses): $ ( for x in a b c; { echo $x; } ) a b c $ typeset -p x bash: typeset: x: not found 3) use a function and declare x local to the function

Re: declare -p my_function does not print its definition. A bug?

2014-10-18 Thread Alan Wild
I'll agree it's non-obvious, but this works for me on a BASH 2.x I have handy. arwild01@BRONX:~$ echo $BASH_VERSION 2.05b.0(1)-release arwild01@BRONX:~$ function myfunc() { :; } arwild01@BRONX:~$ declare -f myfunc myfunc () { : } -Alan On Sat, Oct 18, 2014 at 9:35 AM, Tim Friske wrote: >

Re: CVE-2014-7169 vs CVE-2014-6271

2014-09-26 Thread Alan Wild
) to understand whether they were in line with Red Hat. -Alan On Fri, Sep 26, 2014 at 4:11 PM, Eric Blake wrote: > On 09/26/2014 02:57 PM, Alan Wild wrote: > > I want to apologize for adding more confusion to this issue. My > statements > > about CVE-2014-7169 where incorrec

Re: CVE-2014-7169 vs CVE-2014-6271

2014-09-26 Thread Alan Wild
; "$@"; }; export -f x; env | egrep "functions still work"' BASH_FUNC_x()=() { echo "functions still work" "$@" -Alan On Fri, Sep 26, 2014 at 12:06 PM, Alan Wild wrote: > Not that I get a "vote", but if I did... I'm completely supp

Re: CVE-2014-7169 vs CVE-2014-6271

2014-09-26 Thread Alan Wild
reasonable middle-ground then pulling it altogether. -Alan On Fri, Sep 26, 2014 at 11:58 AM, Alan Wild wrote: > I've been searching for some clarification on these two "fixes" and I'm > utterly confused. I've been lead to believe RedHat's first patch (6271) is &

CVE-2014-7169 vs CVE-2014-6271

2014-09-26 Thread Alan Wild
I've been searching for some clarification on these two "fixes" and I'm utterly confused. I've been lead to believe RedHat's first patch (6271) is based on code from Chet that just causes bash to reject functions where code appears outside of the function body. However, this patch was labeled as