bug-bash
[Top][All Lists]
Advanced

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

Re: bash 4.x filters out environmental variables containing a dot in the


From: Chet Ramey
Subject: Re: bash 4.x filters out environmental variables containing a dot in the name
Date: Tue, 21 Aug 2012 15:02:03 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0

On 8/21/12 7:45 AM, Ondrej Oprala wrote:
> Hi,
> unless this bug is already fixed in some way

I changed bash-4.1 to remember environment strings that are not valid shell
variable names, like those containing a dot, and add them to the
environment exported to commands.  They're not valid shell variable names,
so they won't cause shell variables to be created, but they will be passed
to commands.

If I recall correctly, the issue was that bash-3.2 allowed you to create
variables with invalid names, which you could not then do anything with, if
those names showed up in the environment.  Bash-4.0 stopped the creation
of the invalid shell variables.  Bash-4.1 compromised as described above.

You can test it by doing something like

env foo.bar=make bash-4.2

and then, in the instance of bash-4.2, run `printenv' or `env' and grep
for '^foo'

Chet

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



reply via email to

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