svashisht / rpms / bash

Forked from rpms/bash 4 years ago
Clone

Blame SOURCES/bash-4.2-enable-hyphened-fn-export.patch

ff19ae
--- variables.cold	2015-01-16 13:53:13.817363093 +0100
ff19ae
+++ variables.c	2015-01-16 13:57:41.839425969 +0100
ff19ae
@@ -366,7 +366,7 @@ initialize_shell_variables (env, privmod
ff19ae
 	  /* Don't import function names that are invalid identifiers from the
ff19ae
 	     environment, though we still allow them to be defined as shell
ff19ae
 	     variables. */
ff19ae
-	  if (legal_identifier (temp_name))
ff19ae
+	  if (absolute_program (temp_name) == 0 && (posixly_correct == 0 || legal_identifier (temp_name)))
ff19ae
 	    parse_and_execute (temp_string, temp_name,
ff19ae
 			       SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
ff19ae