bug-bash
[Top][All Lists]
Advanced

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

Re: declare a="$b" if $a previously set as array


From: Chet Ramey
Subject: Re: declare a="$b" if $a previously set as array
Date: Mon, 15 Dec 2014 22:00:54 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/14/14 4:44 PM, Stephane Chazelas wrote:

> There's still a (security) issue with
> 
> declare -x/-l/-r
> that may still be used in non-function contexts (not "export" or
> "readonly"), and as result for things like:
> 
> saved=$(export -p var)
> ...
> eval "$saved"
> 
> And with declare -g in functions, so probably still worth
> addressing.

What's your proposal?  Let's see if we can get to something concrete.
Something like what I proposed in one of my previous messages would
probably work to make

declare -a var=value

closer to

declare -a var; var=value

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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