[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: REGRESSION: shellshock patch rejects valid function names
From: |
Arfrever Frehtes Taifersar Arahesis |
Subject: |
Re: REGRESSION: shellshock patch rejects valid function names |
Date: |
Sat, 27 Sep 2014 23:53:12 +0200 |
User-agent: |
KMail (GNU/Linux) |
2014-09-27 23:12 Eric Blake napisał(a):
> 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).
Ability to export/import functions with "=" in function names could be achieved
by not embedding
function names in environmental variables and using a single BASH_FUNCTIONS
environmental
variable whose value would contain code of all exported functions (in format
similar to
`declare -fpx` / `export -fp`).
--
Arfrever Frehtes Taifersar Arahesis
signature.asc
Description: This is a digitally signed message part.
- Re: REGRESSION: shellshock patch rejects valid function names, (continued)
- 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, 2014/09/27
- Re: REGRESSION: shellshock patch rejects valid function names,
Arfrever Frehtes Taifersar Arahesis <=
- 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
- Re: REGRESSION: shellshock patch rejects valid function names, Eric Blake, 2014/09/27