3 if [ $# -eq 3 -a "$2" = '-d' ]; then
5 elif [ $# -ne 1 ]; then
6 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
11 -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
13 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
18 # DP: [PATCH] Disable all exported shell functions.
20 diff --git a/variables.c b/variables.c
21 index 92a5a10..fe0832e 100644
24 @@ -347,6 +347,7 @@ initialize_shell_variables (env, privmode)
26 temp_var = (SHELL_VAR *)NULL;
28 +#if 0 /* Disable exporting shell functions because they are mad. */
29 /* If exported function, define it now. Don't import functions from
30 the environment in privileged mode. */
31 if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
32 @@ -380,6 +381,9 @@ initialize_shell_variables (env, privmode)
33 report_error (_("error importing function definition for `%s'"), name);
37 + if (0) ; /* needed for syntax */
39 #if defined (ARRAY_VARS)
41 /* Array variables may not yet be exported. */