diff options
author | Tavis Ormandy <taviso@gentoo.org> | 2005-06-08 23:58:29 +0000 |
---|---|---|
committer | Tavis Ormandy <taviso@gentoo.org> | 2005-06-08 23:58:29 +0000 |
commit | 00376c449dbcd0e605aa4bd63021c4df51444d31 (patch) | |
tree | dd24c72b78de2f292bac287bb263e68f91a3d9da /app-admin | |
parent | Unmask python-2.4. (diff) | |
download | historical-00376c449dbcd0e605aa4bd63021c4df51444d31.tar.gz historical-00376c449dbcd0e605aa4bd63021c4df51444d31.tar.bz2 historical-00376c449dbcd0e605aa4bd63021c4df51444d31.zip |
make sure /usr/local is in secure_path
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/sudo/ChangeLog | 7 | ||||
-rw-r--r-- | app-admin/sudo/Manifest | 24 | ||||
-rw-r--r-- | app-admin/sudo/sudo-1.6.8_p8-r3.ebuild | 57 |
3 files changed, 55 insertions, 33 deletions
diff --git a/app-admin/sudo/ChangeLog b/app-admin/sudo/ChangeLog index ab2146f2a6f4..c144e285575d 100644 --- a/app-admin/sudo/ChangeLog +++ b/app-admin/sudo/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-admin/sudo # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.50 2005/06/08 19:29:17 killerfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/ChangeLog,v 1.51 2005/06/08 23:58:29 taviso Exp $ + + 09 Jun 2005; Tavis Ormandy <taviso@gentoo.org> sudo-1.6.8_p8-r3.ebuild: + ROOTPATH does not contain /usr/local prefixed directories in recent + baselayout, add function to clean up duplicate entries and ensure /usr/local + is included. 08 Jun 2005; Rene Nussbaumer <killerfox@gentoo.org> sudo-1.6.7_p5-r4.ebuild: diff --git a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest index bf44c153bd8b..dbeb8b6bbf60 100644 --- a/app-admin/sudo/Manifest +++ b/app-admin/sudo/Manifest @@ -1,20 +1,20 @@ -MD5 5f94fab34f7b92e346d4060afce2e381 ChangeLog 6882 -MD5 027e3b3587dbd8bf6e93dd341a1e4162 sudo-1.6.7_p5-r4.ebuild 1501 MD5 eec74c7e7844116754be94ca7ed74d49 sudo-1.6.8_p8-r2.ebuild 4708 -MD5 8fc22f08ecb2e292e60ce7553c58d0c2 metadata.xml 222 -MD5 d144fe000e527387f5074e722f48c687 sudo-1.6.8_p8-r3.ebuild 4716 MD5 1830dd653b9b5b92fa5cc86823e06d65 sudo-1.6.7_p5-r2.ebuild 1438 +MD5 027e3b3587dbd8bf6e93dd341a1e4162 sudo-1.6.7_p5-r4.ebuild 1501 +MD5 829add0746b8bc41ebd835caf04d1eb1 sudo-1.6.8_p8-r3.ebuild 5201 +MD5 1d6f461e800752249f8d6d60f456a5b0 ChangeLog 7118 MD5 02caf6e86d5e08fd89baccd299a0ee3c sudo-1.6.7_p5-r5.ebuild 1508 -MD5 0b50aabedf9bb326893b5f1c333e46b2 files/sudo-skeychallengeargs.diff 567 +MD5 8fc22f08ecb2e292e60ce7553c58d0c2 metadata.xml 222 +MD5 a5463236fbb98e4ee6b1a0faba8c9c52 files/sudo 135 +MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5-r2 64 MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5-r4 64 -MD5 0c8a06b3d3d86e988a826c8d9e86dbbf files/digest-sudo-1.6.8_p8-r3 64 MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5-r5 64 -MD5 ea5d9d51e647a2dbd410d952019ff19b files/digest-sudo-1.6.7_p5-r2 64 -MD5 7d96f3ce4a5f858afd5962b8ba8118e0 files/sudoers 1339 -MD5 774b75e759fe13c7334c523b1db8ab2e files/sudo_include 67 -MD5 0c8a06b3d3d86e988a826c8d9e86dbbf files/digest-sudo-1.6.8_p8-r2 64 -MD5 4362800877ccb8e27de5437707d8a954 files/sudo-strip-bash-functions.diff 1335 MD5 6c08a6d5527a45278ebc165df7f0031d files/sudo-1.6.8_p8 223 -MD5 a5463236fbb98e4ee6b1a0faba8c9c52 files/sudo 135 +MD5 0c8a06b3d3d86e988a826c8d9e86dbbf files/digest-sudo-1.6.8_p8-r2 64 +MD5 0c8a06b3d3d86e988a826c8d9e86dbbf files/digest-sudo-1.6.8_p8-r3 64 +MD5 0b50aabedf9bb326893b5f1c333e46b2 files/sudo-skeychallengeargs.diff 567 +MD5 7d96f3ce4a5f858afd5962b8ba8118e0 files/sudoers 1339 MD5 b906eb71f7564707384cfa9fc80c1b5f files/sudo-1.6.7_p5-strip-bash-functions.diff 1101 MD5 b1fc3dd8440dc02690820c01190106a3 files/sudo-strip-shellopts.diff 316 +MD5 774b75e759fe13c7334c523b1db8ab2e files/sudo_include 67 +MD5 4362800877ccb8e27de5437707d8a954 files/sudo-strip-bash-functions.diff 1335 diff --git a/app-admin/sudo/sudo-1.6.8_p8-r3.ebuild b/app-admin/sudo/sudo-1.6.8_p8-r3.ebuild index bcb5082da5e5..a47bf9ed6ee8 100644 --- a/app-admin/sudo/sudo-1.6.8_p8-r3.ebuild +++ b/app-admin/sudo/sudo-1.6.8_p8-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 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_p8-r3.ebuild,v 1.1 2005/06/08 12:53:55 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sudo/sudo-1.6.8_p8-r3.ebuild,v 1.2 2005/06/08 23:58:29 taviso Exp $ inherit eutils pam @@ -14,8 +14,7 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="pam skey offensive ldap" -DEPEND="pam? ( virtual/pam ) - skey? ( >=app-admin/skey-1.1.5-r1 ) +DEPEND="pam? ( virtual/pam ) skey? ( >=app-admin/skey-1.1.5-r1 ) ldap? ( >=net-nds/openldap-2.1.30-r1 )" S=${WORKDIR}/${P/_/} @@ -55,8 +54,8 @@ src_unpack() { # sudo_bad_var 'PERL_SIGNALS' # perl, use deferred signals. <?> sudo_bad_var 'FPATH' # ksh, search path for functions. sudo_bad_var 'PS4' # sh, in case set -x is used. <?> -# sudo_bad_var 'NULLCMD' # zsh, command on null-redir. <?> -# sudo_bad_var 'READNULLCMD' # zsh, command on null-redir. <?> + sudo_bad_var 'NULLCMD' # zsh, command on null-redir. <?> + sudo_bad_var 'READNULLCMD' # zsh, command on null-redir. <?> # sudo_bad_var 'TMPPREFIX' # zsh, prefix for tmp files. <?> sudo_bad_var 'GLOBIGNORE' # bash, glob paterns to ignore. <?> sudo_bad_var 'PERL5OPT' # perl, set options. @@ -76,21 +75,25 @@ src_compile() { # FIXME: secure_path is a compile time setting. using ROOTPATH # is not perfect, env-update may invalidate this, but until it # is available as a sudoers setting this will have to do. - ebegin "Setting secure_path..." - - # why not use grep? variable might be expanded from other variables - # declared in that file. cannot just source the file, would override - # any variables already set. - eval `PS4= bash -x /etc/profile.env 2>&1 | \ - while read line; do - case $line in - ROOTPATH=*) echo $line; break;; - *) continue;; - esac - done` || ewarn "failed to find secure_path, please report this" - eend $? + einfo "Setting secure_path..." + + # why not use grep? variable might be expanded from other variables + # declared in that file. cannot just source the file, would override + # any variables already set. + eval `PS4= bash -x /etc/profile.env 2>&1 | \ + while read line; do + case $line in + ROOTPATH=*) echo $line; break;; + *) continue;; + esac + done` && einfo " Found ROOTPATH..." || \ + ewarn " Failed to find ROOTPATH, please report this." + + # remove any duplicate entries + ROOTPATH=`cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin${ROOTPATH:+:${ROOTPATH}}` + einfo "...done." - econf --with-secure-path="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH:-/usr/local/bin}" --with-env-editor \ + econf --with-secure-path="${ROOTPATH}" --with-env-editor \ $(use_with offensive insults) \ $(use_with offensive all-insults) \ $(use_with pam) \ @@ -114,10 +117,24 @@ src_install() { fperms 0440 /etc/sudoers } +# remove duplicate path entries from $1 +cleanpath() { + local i=1 x n IFS=: + local -a paths; paths=($1) + + for ((n=${#paths[*]}-1;i<=n;i++)); do + for ((x=0;x<i;x++)); do + test "${paths[i]}" == "${paths[x]}" && { + einfo " Duplicate entry ${paths[i]} removed..." 1>&2 + unset paths[i]; continue 2; } + done + done; echo "${paths[*]}" +} + +# add $1 to default env_delete list. sudo_bad_var() { local target='env.c' marker='\*initial_badenv_table\[\]' - # add $1 to initial_badenv_table[]. ebegin " $1" sed -i 's#\(^.*'${marker}'.*$\)#\1\n\t"'${1}'",#' ${S}/${target} eend $? |