commit patch
authorTavis Ormandy <taviso@gentoo.org>
Sat, 13 Nov 2004 09:31:38 +0000 (09:31 +0000)
committerTavis Ormandy <taviso@gentoo.org>
Sat, 13 Nov 2004 09:31:38 +0000 (09:31 +0000)
app-admin/sudo/Manifest
app-admin/sudo/files/sudo-1.6.7_p5-strip-bash-functions.diff [new file with mode: 0644]
app-admin/sudo/sudo-1.6.7_p5-r2.ebuild

index f7e9657262cd56abaf5f90a6063894f0dfbb0c38..3877bb1f2d0e504285f4f153af007b3e19e34d6b 100644 (file)
@@ -1,4 +1,4 @@
-MD5 0f610d24209cdeaa1334fdba75bfd726 sudo-1.6.7_p5-r2.ebuild 1439
+MD5 8286f190e7bd2265f54b37c7c5655f07 sudo-1.6.7_p5-r2.ebuild 1490
 MD5 0e0016865e514e87266db998b33bd851 sudo-1.6.6.ebuild 877
 MD5 10739407a2bc68ce76fe7e694e3cbd73 sudo-1.6.8_p1.ebuild 1053
 MD5 81fb337f88166432ab3ab058a6f9df0e sudo-1.6.8_p1-r1.ebuild 1433
@@ -15,6 +15,7 @@ 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 b906eb71f7564707384cfa9fc80c1b5f files/sudo-1.6.7_p5-strip-bash-functions.diff 1101
 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-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 (file)
index 0000000..021005f
--- /dev/null
@@ -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);
index 6c07d96a6fa2ecdf1c3631de0f5f079d44ea17c2..8ec6cd5ef7946ebbdbe54eb2ed9a4b285fab182a 100644 (file)
@@ -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() {