diff options
-rw-r--r-- | app-admin/sudo/files/sudo-1.6.7_p5-strip-bash-functions.diff | 32 | ||||
-rw-r--r-- | app-admin/sudo/sudo-1.6.7_p5-r2.ebuild | 3 |
2 files changed, 34 insertions, 1 deletions
diff --git a/app-admin/sudo/files/sudo-1.6.7_p5-strip-bash-functions.diff b/app-admin/sudo/files/sudo-1.6.7_p5-strip-bash-functions.diff new file mode 100644 index 000000000000..021005f888c4 --- /dev/null +++ b/app-admin/sudo/files/sudo-1.6.7_p5-strip-bash-functions.diff @@ -0,0 +1,32 @@ +diff -ruN sudo-1.6.7p5/env.c sudo-1.6.7p5.new/env.c +--- sudo-1.6.7p5/env.c 2003-05-06 05:32:22.000000000 +0100 ++++ sudo-1.6.7p5.new/env.c 2004-11-11 23:27:47.659539072 +0000 +@@ -296,7 +296,14 @@ + /* Pull in vars we want to keep from the old environment. */ + for (ep = envp; *ep; ep++) { + keepit = 0; +- for (cur = def_list(I_ENV_KEEP); cur; cur = cur->next) { ++ ++ /* Skip variables with values beginning with () (bash functions) */ ++ if ((cp = strchr(*ep, '=')) != NULL) { ++ if (strncmp(cp, "=() ", 3) == 0) ++ continue; ++ } ++ ++ for (cur = def_list(I_ENV_KEEP); cur; cur = cur->next) { + len = strlen(cur->value); + /* Deal with '*' wildcard */ + if (cur->value[len - 1] == '*') { +@@ -370,6 +377,12 @@ + for (ep = envp; *ep; ep++) { + okvar = 1; + ++ /* Skip variables with values beginning with () (bash functions) */ ++ if ((cp = strchr(*ep, '=')) != NULL) { ++ if (strncmp(cp, "=() ", 3) == 0) ++ continue; ++ } ++ + /* Skip anything listed in env_delete. */ + for (cur = def_list(I_ENV_DELETE); cur && okvar; cur = cur->next) { + len = strlen(cur->value); diff --git a/app-admin/sudo/sudo-1.6.7_p5-r2.ebuild b/app-admin/sudo/sudo-1.6.7_p5-r2.ebuild index 6c07d96a6fa2..8ec6cd5ef794 100644 --- a/app-admin/sudo/sudo-1.6.7_p5-r2.ebuild +++ b/app-admin/sudo/sudo-1.6.7_p5-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.6.7_p5-r2.ebuild,v 1.1 2004/11/11 23:15:15 taviso Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.6.7_p5-r2.ebuild,v 1.2 2004/11/13 09:31:38 taviso Exp $ inherit gnuconfig eutils @@ -25,6 +25,7 @@ src_unpack() { unpack ${A} gnuconfig_update ${S} use skey && epatch ${FILESDIR}/${PN}-skeychallengeargs.diff + epatch ${FILESDIR}/${P}-strip-bash-functions.diff } src_compile() { |