chiark / gitweb /
07e9ef8295427d3ad574318339674991f17225fa
[bash.git] / debian / patches / 0001-Disable-all-exported-shell-functions.diff
1 # DP: [PATCH] Disable all exported shell functions.
2
3 diff --git a/bash/variables.c b/bash/variables.c
4 index 92a5a10..fe0832e 100644
5 --- a/bash/variables.c
6 +++ b/bash/variables.c
7 @@ -347,6 +347,7 @@ initialize_shell_variables (env, privmode)
8  
9        temp_var = (SHELL_VAR *)NULL;
10  
11 +#if 0 /* Disable exporting shell functions because they are mad. */
12        /* If exported function, define it now.  Don't import functions from
13          the environment in privileged mode. */
14        if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
15 @@ -380,6 +381,9 @@ initialize_shell_variables (env, privmode)
16               report_error (_("error importing function definition for `%s'"), name);
17             }
18         }
19 +#else
20 +      if (0) ; /* needed for syntax */
21 +#endif
22  #if defined (ARRAY_VARS)
23  #  if ARRAY_EXPORT
24        /* Array variables may not yet be exported. */
25 -- 
26 1.7.10.4
27