changeset 1691:732ebb18699e

The ancient version of bash had function definition exports, and was thus buggy. Disable this "feature".
author Rob Landley <rob@landley.net>
date Sun, 28 Sep 2014 22:06:59 -0500
parents 98b3b6ff9d44
children 5a7071eb01bb
files sources/patches/bash-fixfunc.patch
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/patches/bash-fixfunc.patch	Sun Sep 28 22:06:59 2014 -0500
@@ -0,0 +1,14 @@
+Disable exported function definitions because they're a giant pointless bug.
+
+diff -ru bash/variables.c bash.bak/variables.c
+--- bash/variables.c	2002-06-25 08:43:33.000000000 -0500
++++ bash.bak/variables.c	2014-09-28 22:04:31.497654646 -0500
+@@ -260,7 +260,7 @@
+ 
+       /* If exported function, define it now.  Don't import functions from
+ 	 the environment in privileged mode. */
+-      if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
++      if (0)
+ 	{
+ 	  string_length = strlen (string);
+ 	  temp_string = (char *)xmalloc (3 + string_length + char_index);