[Top][All Lists]

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

Re: REGRESSION: shellshock patch rejects valid function names

From: Ángel González
Subject: Re: REGRESSION: shellshock patch rejects valid function names
Date: Sat, 27 Sep 2014 00:26:03 +0200

Eric Blake wrote:
> At any rate, this seems like an inadvertent regression that could be
> patched; are you willing to propose such a patch?  The gist of the
> matter is that the code base must use the same decision on what forms a
> valid function name as it does in deciding what exported non-variable
> names in the environment can be reinstated as functions.  I'm fairly
> certain that Chet will be reasonable about this, and after the worst
> fires are put out, we can revisit this.

The patch seems straightforward:

diff --git a/variables.c b/variables.c
index 92a5a10..6552e69 100644
--- a/variables.c
+++ b/variables.c
@@ -361,7 +361,7 @@ initialize_shell_variables (env, privmode)
          /* Don't import function names that are invalid identifiers from the
             environment, though we still allow them to be defined as shell
             variables. */
-         if (legal_identifier (name))
+         if (check_identifier (name))
            parse_and_execute (temp_string, name, 
          if (temp_var = find_function (name))

reply via email to

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