diff options
author | Tavis Ormandy <taviso@gentoo.org> | 2004-11-11 23:25:15 +0000 |
---|---|---|
committer | Tavis Ormandy <taviso@gentoo.org> | 2004-11-11 23:25:15 +0000 |
commit | 9dba9b9c9b011ef75fadb90c25687017c8bf6cd7 (patch) | |
tree | e466a11c41a4607c90449aca30a124e9b1dd4651 /app-admin/sudo | |
parent | s390 KEYWORDS (diff) | |
download | historical-9dba9b9c9b011ef75fadb90c25687017c8bf6cd7.tar.gz historical-9dba9b9c9b011ef75fadb90c25687017c8bf6cd7.tar.bz2 historical-9dba9b9c9b011ef75fadb90c25687017c8bf6cd7.zip |
strip bash functions from environment
Diffstat (limited to 'app-admin/sudo')
-rw-r--r-- | app-admin/sudo/Manifest | 3 | ||||
-rw-r--r-- | app-admin/sudo/files/sudo-strip-bash-functions.diff | 44 | ||||
-rw-r--r-- | app-admin/sudo/sudo-1.6.8_p1-r2.ebuild | 3 |
3 files changed, 48 insertions, 2 deletions
diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest index 500cc14f516f..f7e9657262cd 100644 --- a/app-admin/sudo/Manifest +++ b/app-admin/sudo/Manifest @@ -5,7 +5,7 @@ MD5 81fb337f88166432ab3ab058a6f9df0e sudo-1.6.8_p1-r1.ebuild 1433 MD5 8c94167c21e8ef1c80a87dd4a7d448bf sudo-1.6.7_p5-r1.ebuild 1371 MD5 c4364dcfd263577598949e28a081203a sudo-1.6.7_p5.ebuild 976 MD5 42569f9df316909f79f5ddd7802a21a8 ChangeLog 3539 -MD5 12798f99839d9dedd0cd74db02d23fa7 sudo-1.6.8_p1-r2.ebuild 1501 +MD5 0209e0398b74dcb8dfd570e1fa4d8b56 sudo-1.6.8_p1-r2.ebuild 1552 MD5 a5463236fbb98e4ee6b1a0faba8c9c52 files/sudo 135 MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5-r1 64 MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5-r2 64 @@ -15,5 +15,6 @@ MD5 0b50aabedf9bb326893b5f1c333e46b2 files/sudo-skeychallengeargs.diff 567 MD5 d3a1edd41e6a44e7dae35d250aea266e files/digest-sudo-1.6.6 62 MD5 3ec686ddc0fb74ee3a84e182e23ceb96 files/sudoers 854 MD5 46618a1b8f9dd4b3d35476c1e63217b0 files/sudo-1.6.8_p1-suid_fix.patch 434 +MD5 4362800877ccb8e27de5437707d8a954 files/sudo-strip-bash-functions.diff 1335 MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5 64 MD5 703a1c523c89153f9bf6f11be6b65778 files/digest-sudo-1.6.8_p1 64 diff --git a/app-admin/sudo/files/sudo-strip-bash-functions.diff b/app-admin/sudo/files/sudo-strip-bash-functions.diff new file mode 100644 index 000000000000..1bd6d6483508 --- /dev/null +++ b/app-admin/sudo/files/sudo-strip-bash-functions.diff @@ -0,0 +1,44 @@ +Index: env.c +=================================================================== +RCS file: /home/cvs/courtesan/sudo/env.c,v +retrieving revision 1.42 +retrieving revision 1.43 +diff -u -r1.42 -r1.43 +--- env.c 8 Sep 2004 15:57:49 -0000 1.42 ++++ env.c 11 Nov 2004 16:20:59 -0000 1.43 +@@ -52,7 +52,7 @@ + #include "sudo.h" + + #ifndef lint +-static const char rcsid[] = "$Sudo: env.c,v 1.42 2004/09/08 15:57:49 millert Exp $"; ++static const char rcsid[] = "$Sudo: env.c,v 1.43 2004/11/11 16:20:59 millert Exp $"; + #endif /* lint */ + + /* +@@ -323,6 +323,13 @@ + /* Pull in vars we want to keep from the old environment. */ + for (ep = envp; *ep; ep++) { + keepit = 0; ++ ++ /* Skip variables with values beginning with () (bash functions) */ ++ if ((cp = strchr(*ep, '=')) != NULL) { ++ if (strncmp(cp, "=() ", 3) == 0) ++ continue; ++ } ++ + for (cur = def_env_keep; cur; cur = cur->next) { + len = strlen(cur->value); + /* Deal with '*' wildcard */ +@@ -404,6 +411,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_env_delete; cur && okvar; cur = cur->next) { diff --git a/app-admin/sudo/sudo-1.6.8_p1-r2.ebuild b/app-admin/sudo/sudo-1.6.8_p1-r2.ebuild index 3749a8dba87c..f4f6b8e2e133 100644 --- a/app-admin/sudo/sudo-1.6.8_p1-r2.ebuild +++ b/app-admin/sudo/sudo-1.6.8_p1-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.8_p1-r2.ebuild,v 1.1 2004/11/11 23:15:15 taviso Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.6.8_p1-r2.ebuild,v 1.2 2004/11/11 23:25:15 taviso Exp $ inherit gnuconfig eutils @@ -29,6 +29,7 @@ src_unpack() { epatch ${FILESDIR}/${P}-suid_fix.patch use skey && epatch ${FILESDIR}/${PN}-skeychallengeargs.diff + epatch ${FILESDIR}/sudo-strip-bash-functions.diff } src_compile() { |