[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Weird error of bash "/bin/sh: line 1: `BASH_FUNC_f%%': n
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Weird error of bash "/bin/sh: line 1: `BASH_FUNC_f%%': not a valid identifier" |
Date: |
Sat, 04 Oct 2014 15:53:27 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 10/4/14, 2:53 PM, Bob Proulx wrote:
> I will note that I checked an old version 3.2.51 and did not have an
> invalid identifier problem. It worked for me with the official
> patches. Therefore I conclude that Apple has added different patches
> for their 3.2.51. There were many other patches discussed around the
> time of the security disclosure.
Apple kind of rolled their own with the exported function namespace patch
(bash32-054) and didn't end up using the same prefix and suffix as I did
(they used BASH_FUNC< and >, respectively). Since the Apple bash doesn't
recognize the prefix and suffix I used in the official patches as denoting
an exported function definition, it attempts to create a shell variable
with that name. It's not a valid identifier, so the attempted variable
assignment fails. I didn't make the change to ignore invalid identifiers
in the environment until after bash-3.2, so Apple doesn't have that change
and throws an error.
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/