[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inconsistency with "readonly" and scope
From: |
Chet Ramey |
Subject: |
Re: inconsistency with "readonly" and scope |
Date: |
Sat, 14 Apr 2012 21:21:26 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 4/13/12 8:50 PM, Linda Walsh wrote:
>
>
> Chet Ramey wrote:
>
>> This is intended. Bash doesn't allow a local copy of a variable to
>> override a readonly global one. This can be a potential security hole,
>
> ---
> You can look at it that way, but it also hinders modular programming.
>
> If I declare a variable to be local, I wouldn't expect it to fail and
> be overridden by some global namespace pollution.
If I declare a variable readonly at global scope, I wouldn't expect it
to be overridden by some local namespace pollution.
> It is overridable, but not easily.
Yes, it is.
--
``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/
- Re: inconsistency with "readonly" and scope, (continued)
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/12
- Re: inconsistency with "readonly" and scope, Steven W. Orr, 2012/04/12
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/12
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, Steven W. Orr, 2012/04/12
- Re: inconsistency with "readonly" and scope, dethrophes, 2012/04/12
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12
- Re: inconsistency with "readonly" and scope, Linda Walsh, 2012/04/13
- Re: inconsistency with "readonly" and scope,
Chet Ramey <=
- Re: inconsistency with "readonly" and scope, Maarten Billemont, 2012/04/15
- Re: inconsistency with "readonly" and scope, Andreas Schwab, 2012/04/15
- Re: inconsistency with "readonly" and scope, Linda Walsh, 2012/04/15
Re: inconsistency with "readonly" and scope, Chet Ramey, 2012/04/12