From 0e55bbb353cb2cceebdcb357a9e43333c9fb1820 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 25 Sep 2014 15:08:39 +0100 Subject: [PATCH] Disable all exported shell functions. Signed-off-by: Ian Jackson --- variables.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variables.c b/variables.c index 92a5a10..fe0832e 100644 --- a/variables.c +++ b/variables.c @@ -347,6 +347,7 @@ initialize_shell_variables (env, privmode) temp_var = (SHELL_VAR *)NULL; +#if 0 /* Disable exporting shell functions because they are mad. */ /* 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)) @@ -380,6 +381,9 @@ initialize_shell_variables (env, privmode) report_error (_("error importing function definition for `%s'"), name); } } +#else + if (0) ; /* needed for syntax */ +#endif #if defined (ARRAY_VARS) # if ARRAY_EXPORT /* Array variables may not yet be exported. */ -- 2.30.2