[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REGRESSION: shellshock patch rejects valid function names

From: Stephane Chazelas
Subject: Re: REGRESSION: shellshock patch rejects valid function names
Date: Mon, 29 Sep 2014 15:35:43 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

2014-09-27 23:53:12 +0200, Arfrever Frehtes Taifersar Arahesis:
> 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`).

That's what I had in mind as well.

bash could align its function definition syntax with zsh's and

BASH_FUNCTIONS="f(){ echo f;}
'some function'(){ echo sf; }
'even with
newline and / and '\''quote
...'() { echo x; }"

That would also be nicer with the environment as well
("BASH_FUNC_xxx()=" needs 14 bytes, plus the pointer (4/8 bytes)
per exported function.

If bash were to implement that, sudo and possible others would
have to be updated at the same time to blacklist that variable
(at the moment sudo blacklists variables whose value starts with
() which is why the change to BASH_FUNC_xxx()=()... didn't
expose sudo).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]