[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: REGRESSION: shellshock patch rejects valid function names
From: |
Eric Blake |
Subject: |
Re: REGRESSION: shellshock patch rejects valid function names |
Date: |
Sat, 27 Sep 2014 15:12:13 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 09/27/2014 02:57 PM, Arfrever Frehtes Taifersar Arahesis wrote:
> 2014-09-27 22:29 Eric Blake napisał(a):
>> Thankfully, bash already forbids trying to name a function 'a=b'
>
> It works in bash 4.3.26:
>
> $ function a=b() { echo A; }
> $ "a=b"
> A
Oh, you used the 'function' keyword, coupled with NOT quoting the name
of the function. I was trying to create the name via quotation:
$ bash -c 'a\=b () { echo hi; }; a\=b'
bash: `a\=b': not a valid identifier
bash: a=b: command not found
Still, since I strongly believe that import/export and valid function
names should be the same set of characters, but that it would be
extremely difficult to unambiguously encode = into environment variable
function names, I think that we SHOULD take the step of forbidding '='
in function names (the 'function' keyword should NOT be able to define
any function that cannot also be defined in isolation, nor which cannot
be imported from the environment using whatever improved implementation
we decide for function export/import).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- REGRESSION: shellshock patch rejects valid function names, (continued)
- REGRESSION: shellshock patch rejects valid function names, Jay Freeman (saurik), 2014/09/26
- Re: REGRESSION: shellshock patch rejects valid function names, Jay Freeman (saurik), 2014/09/26
- Re: REGRESSION: shellshock patch rejects valid function names, Greg Wooledge, 2014/09/26
- Re: REGRESSION: shellshock patch rejects valid function names, Eric Blake, 2014/09/26
- Re: REGRESSION: shellshock patch rejects valid function names, Ángel González, 2014/09/26
- Re: REGRESSION: shellshock patch rejects valid function names, Dan Douglas, 2014/09/26
- Re: REGRESSION: shellshock patch rejects valid function names, Chet Ramey, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Eric Blake, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Arfrever Frehtes Taifersar Arahesis, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names,
Eric Blake <=
- Re: REGRESSION: shellshock patch rejects valid function names, Arfrever Frehtes Taifersar Arahesis, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Stephane Chazelas, 2014/09/29
- Re: REGRESSION: shellshock patch rejects valid function names, Chet Ramey, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Eric Blake, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Jay Freeman (saurik), 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Eric Blake, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Chet Ramey, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Chet Ramey, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Eric Blake, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names, Chet Ramey, 2014/09/27