chiark / gitweb /
Disable all exported shell functions.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Sep 2014 14:08:39 +0000 (15:08 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Sep 2014 14:09:35 +0000 (15:09 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
variables.c

index 92a5a103e4fe8f67d4358c5275e132b8a41f2591..fe0832ef3dcff731429183f2a3441d08b1ff5d89 100644 (file)
@@ -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. */