diff options
author | Peter Volkov <pva@gentoo.org> | 2008-01-31 13:28:29 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-01-31 13:28:29 +0000 |
commit | c3de03e02d25455da8da20b73e1481a82424d14b (patch) | |
tree | 5f1416a728aec712420732293c38e4fcfddf6f05 /net-analyzer | |
parent | Deal with new coreutils, the new cut insists you start from 1, not 0. Also, b... (diff) | |
download | gentoo-2-c3de03e02d25455da8da20b73e1481a82424d14b.tar.gz gentoo-2-c3de03e02d25455da8da20b73e1481a82424d14b.tar.bz2 gentoo-2-c3de03e02d25455da8da20b73e1481a82424d14b.zip |
Version bump. Fixed security issue (CVE-2007-1444), bug 170569, reported by Pierre-Yves Rofes <py AT gentoo.org>. Patch for vulnerability taken from bugs.debian.org/413658, thank you Nico Golde <nion AT debian.org> for the fix! Remove old.
(Portage version: 2.1.3.19)
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/netperf/ChangeLog | 13 | ||||
-rw-r--r-- | net-analyzer/netperf/files/netperf-2.2alpha.diff | 20 | ||||
-rw-r--r-- | net-analyzer/netperf/files/netperf-CVE-2007-1444.patch | 71 | ||||
-rw-r--r-- | net-analyzer/netperf/files/netperf-fix-scripts.patch | 100 | ||||
-rw-r--r-- | net-analyzer/netperf/netperf-2.2.4.ebuild | 49 | ||||
-rw-r--r-- | net-analyzer/netperf/netperf-2.3.ebuild | 49 | ||||
-rw-r--r-- | net-analyzer/netperf/netperf-2.4.2-r1.ebuild | 47 | ||||
-rw-r--r-- | net-analyzer/netperf/netperf-2.4.4.ebuild | 61 |
8 files changed, 157 insertions, 253 deletions
diff --git a/net-analyzer/netperf/ChangeLog b/net-analyzer/netperf/ChangeLog index 2f7fc94a33de..53305b221686 100644 --- a/net-analyzer/netperf/ChangeLog +++ b/net-analyzer/netperf/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-analyzer/netperf # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/ChangeLog,v 1.35 2008/01/16 20:27:16 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/ChangeLog,v 1.36 2008/01/31 13:28:28 pva Exp $ + +*netperf-2.4.4 (31 Jan 2008) + + 31 Jan 2008; <pva@gentoo.org> -files/netperf-2.2alpha.diff, + +files/netperf-CVE-2007-1444.patch, files/netperf-fix-scripts.patch, + -netperf-2.2.4.ebuild, -netperf-2.3.ebuild, -netperf-2.4.2-r1.ebuild, + +netperf-2.4.4.ebuild: + Version bump. Fixed security issue (CVE-2007-1444), bug 170569, reported by + Pierre-Yves Rofes <py AT gentoo.org>. Patch for vulnerability taken from + bugs.debian.org/413658, thank you Nico Golde <nion AT debian.org> for the + fix! Removed old vulnerables ebuidls. 16 Jan 2008; Fabian Groffen <grobian@gentoo.org> netperf-2.2.4.ebuild, netperf-2.3.ebuild, netperf-2.4.2-r1.ebuild: diff --git a/net-analyzer/netperf/files/netperf-2.2alpha.diff b/net-analyzer/netperf/files/netperf-2.2alpha.diff deleted file mode 100644 index ea13beef219b..000000000000 --- a/net-analyzer/netperf/files/netperf-2.2alpha.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- makefile.olf Sun Jul 15 00:02:19 2001 -+++ makefile Sun Jul 15 00:05:18 2001 -@@ -16,7 +16,7 @@ - # in /usr/local/netperf or /opt/netperf - # - #NETPERF_HOME = /usr/local/netperf --NETPERF_HOME = /opt/netperf -+NETPERF_HOME = /usr/share/netperf - - # The compiler on your system might be somewhere else, and/or have - # a different name. -@@ -85,7 +85,7 @@ - # sending data using sendfile() instead of send(). - - LOG_FILE=DEBUG_LOG_FILE="\"/tmp/netperf.debug\"" --CFLAGS = -Ae -O -D$(LOG_FILE) -DUSE_PSTAT -DHAVE_SENDFILE -+#CFLAGS = -DDO_UNIX - - # Some platforms, and some options, require additional libraries. - # you can add to the "LIBS =" line to accomplish this. if you find diff --git a/net-analyzer/netperf/files/netperf-CVE-2007-1444.patch b/net-analyzer/netperf/files/netperf-CVE-2007-1444.patch new file mode 100644 index 000000000000..ca8a33dee40f --- /dev/null +++ b/net-analyzer/netperf/files/netperf-CVE-2007-1444.patch @@ -0,0 +1,71 @@ +diff -Naur netperf-2.4.4.orig/src/netlib.c netperf-2.4.4.patched/src/netlib.c +--- netperf-2.4.4.orig/src/netlib.c 2007-10-18 01:16:02.000000000 +0400 ++++ netperf-2.4.4.patched/src/netlib.c 2008-01-30 22:03:01.000000000 +0300 +@@ -244,6 +244,7 @@ + union netperf_response_struct netperf_response; + + FILE *where; ++int fd = -1; + + char libfmt = '?'; + +diff -Naur netperf-2.4.4.orig/src/netlib.h netperf-2.4.4.patched/src/netlib.h +--- netperf-2.4.4.orig/src/netlib.h 2007-10-18 01:17:37.000000000 +0400 ++++ netperf-2.4.4.patched/src/netlib.h 2008-01-30 21:46:34.000000000 +0300 +@@ -445,6 +445,7 @@ + extern SOCKET server_sock; + extern int times_up; + extern FILE *where; ++extern int fd; + extern int loops_per_msec; + extern float lib_local_per_cpu_util[]; + +diff -Naur netperf-2.4.4.orig/src/netserver.c netperf-2.4.4.patched/src/netserver.c +--- netperf-2.4.4.orig/src/netserver.c 2007-10-18 01:09:12.000000000 +0400 ++++ netperf-2.4.4.patched/src/netserver.c 2008-01-30 21:57:56.000000000 +0300 +@@ -153,6 +153,9 @@ + char listen_port[10]; + extern char *optarg; + extern int optind, opterr; ++#if !defined(WIN_32) ++char debuglog[] = "/tmp/netperf.debugXXXXXX"; ++#endif + + #ifndef WIN32 + #define SERVER_ARGS "dL:n:p:v:V46" +@@ -225,6 +228,10 @@ + if (!debug) + { + fclose(where); ++#if !defined(WIN32) ++ unlink(debuglog); ++ close(fd); ++#endif + #if !defined(WIN32) && !defined(MPE) && !defined(__VMS) + /* For Unix: reopen the debug write file descriptor to "/dev/null" */ + /* and redirect stdout to it. */ +@@ -918,8 +925,11 @@ + strcpy(FileName, DEBUG_LOG_FILE); + + #ifndef WIN32 +- snprintf(&FileName[strlen(FileName)], sizeof(FileName) - strlen(FileName), "_%d", getpid()); +- if ((where = fopen(FileName, "w")) == NULL) { ++ if((fd = mkstemp(debuglog)) == -1 || (where = fdopen(fd, "w+")) == NULL){ ++ if(fd != -1){ ++ unlink(debuglog); ++ close(fd); ++ } + perror("netserver: debug file"); + exit(1); + } +@@ -947,10 +957,6 @@ + } + } + #endif +- +-#ifndef WIN32 +- chmod(DEBUG_LOG_FILE,0644); +-#endif + + #if WIN32 + if (child) { diff --git a/net-analyzer/netperf/files/netperf-fix-scripts.patch b/net-analyzer/netperf/files/netperf-fix-scripts.patch index d8e3e2f2cc44..2d797c7c556e 100644 --- a/net-analyzer/netperf/files/netperf-fix-scripts.patch +++ b/net-analyzer/netperf/files/netperf-fix-scripts.patch @@ -1,44 +1,31 @@ -diff -u doc/examples.ori/arr_script doc/examples/arr_script ---- doc/examples.ori/arr_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/arr_script 2007-01-29 20:01:16.000000000 +0000 -@@ -10,8 +10,8 @@ +diff -Naur netperf-2.4.4.orig/doc/examples/arr_script netperf-2.4.4/doc/examples/arr_script +--- netperf-2.4.4.orig/doc/examples/arr_script 2007-06-02 02:06:03.000000000 +0400 ++++ netperf-2.4.4/doc/examples/arr_script 2008-01-31 15:34:54.000000000 +0300 +@@ -12,8 +12,7 @@ TOLERANCE=15 MAX_RETRIES=3 - NETPERF="/usr/local/netperf/netperf" - NETPERF="./netperf" -+# NETPERF="/usr/local/netperf/netperf" + NETPERF="/usr/bin/netperf" NPROC_LIST="" RR_SIZES="" -diff -u doc/examples.ori/packet_byte_script doc/examples/packet_byte_script ---- doc/examples.ori/packet_byte_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/packet_byte_script 2007-01-29 20:01:16.000000000 +0000 -@@ -22,7 +22,7 @@ +diff -Naur netperf-2.4.4.orig/doc/examples/packet_byte_script netperf-2.4.4/doc/examples/packet_byte_script +--- netperf-2.4.4.orig/doc/examples/packet_byte_script 2008-01-31 15:23:26.000000000 +0300 ++++ netperf-2.4.4/doc/examples/packet_byte_script 2008-01-31 15:35:21.000000000 +0300 +@@ -25,7 +25,7 @@ fi # where is netperf --NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf} -+NETPERF_CMD=${NETPERF_CMD:=/usr/bin/netperf} +-NETPERF_DIR=${NETPERF_DIR:=/opt/netperf2/bin} ++NETPERF_DIR=${NETPERF_DIR:=/usr/bin} - # at what port will netserver be waiting? If you decide to run - # netserver at a differnet port than the default of 12865, then set -diff -u doc/examples.ori/sctp_stream_script doc/examples/sctp_stream_script ---- doc/examples.ori/sctp_stream_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/sctp_stream_script 2007-01-29 20:01:16.000000000 +0000 -@@ -24,7 +24,7 @@ - # where the programs are - #NETHOME=/usr/local/netperf - #NETHOME="/opt/netperf" --NETHOME=. -+NETHOME=/usr/bin/ # at what port will netserver be waiting? If you decide to run - # netserver at a differnet port than the default of 12865, then set -diff -u doc/examples.ori/snapshot_script doc/examples/snapshot_script ---- doc/examples.ori/snapshot_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/snapshot_script 2007-01-29 20:01:16.000000000 +0000 +diff -Naur netperf-2.4.4.orig/doc/examples/snapshot_script netperf-2.4.4/doc/examples/snapshot_script +--- netperf-2.4.4.orig/doc/examples/snapshot_script 2007-06-02 02:06:03.000000000 +0400 ++++ netperf-2.4.4/doc/examples/snapshot_script 2008-01-31 15:35:38.000000000 +0300 @@ -37,7 +37,7 @@ # # where is netperf installed, there are a few possible places: @@ -48,64 +35,3 @@ diff -u doc/examples.ori/snapshot_script doc/examples/snapshot_script # there should be no more than two parms passed -Only in doc/examples: .svn -diff -u doc/examples.ori/tcp_range_script doc/examples/tcp_range_script ---- doc/examples.ori/tcp_range_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/tcp_range_script 2007-01-29 20:01:16.000000000 +0000 -@@ -43,7 +43,7 @@ - # where is netperf, and are there any "constant" options such as - # the netserver port number - #NETHOME=/usr/etc/net_perf --NETHOME="." -+NETHOME="/usr/bin" - NETPERF=$NETHOME/netperf $PORT - - # How accurate we want the estimate of performance: -diff -u doc/examples.ori/tcp_rr_script doc/examples/tcp_rr_script ---- doc/examples.ori/tcp_rr_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/tcp_rr_script 2007-01-29 20:01:16.000000000 +0000 -@@ -25,7 +25,7 @@ - # where the programs are - #NETHOME=/usr/local/netperf - #NETHOME="/opt/netperf" --NETHOME=. -+NETHOME="/usr/bin" - - # at what port will netserver be waiting? If you decide to run - # netserver at a differnet port than the default of 12865, then set -diff -u doc/examples.ori/tcp_stream_script doc/examples/tcp_stream_script ---- doc/examples.ori/tcp_stream_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/tcp_stream_script 2007-01-29 20:01:16.000000000 +0000 -@@ -24,7 +24,7 @@ - # where the programs are - #NETHOME=/usr/local/netperf - #NETHOME="/opt/netperf" --NETHOME=. -+NETHOME="/usr/bin" - - # at what port will netserver be waiting? If you decide to run - # netserver at a different port than the default of 12865, then set -diff -u doc/examples.ori/udp_rr_script doc/examples/udp_rr_script ---- doc/examples.ori/udp_rr_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/udp_rr_script 2007-01-29 20:01:16.000000000 +0000 -@@ -22,7 +22,7 @@ - - #NETHOME=/usr/local/netperf - #NETHOME="/opt/netperf" --NETHOME="." -+NETHOME="/usr/bin" - - # at what port will netserver be waiting? If you decide to run - # netserver at a differnet port than the default of 12865, then set -diff -u doc/examples.ori/udp_stream_script doc/examples/udp_stream_script ---- doc/examples.ori/udp_stream_script 2007-01-29 20:01:45.000000000 +0000 -+++ doc/examples/udp_stream_script 2007-01-29 20:01:16.000000000 +0000 -@@ -19,7 +19,7 @@ - - #NETHOME=/usr/local/netperf - #NETHOME="/opt/netperf" --NETHOME="." -+NETHOME="/usr/bin" - - # at what port will netserver be waiting? If you decide to run - # netserver at a differnet port than the default of 12865, then set diff --git a/net-analyzer/netperf/netperf-2.2.4.ebuild b/net-analyzer/netperf/netperf-2.2.4.ebuild deleted file mode 100644 index 83664e8bd281..000000000000 --- a/net-analyzer/netperf/netperf-2.2.4.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/netperf-2.2.4.ebuild,v 1.19 2008/01/16 20:27:16 grobian Exp $ - -inherit flag-o-matic - -if [[ $PV == *.*.* ]]; then - MY_P=${P%.*}pl${PV##*.} # convert netperf-2.2.4 => netperf-2.2pl4 - S=${WORKDIR}/${MY_P} -else - MY_P=${P} -fi - -DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." -SRC_URI="ftp://ftp.netperf.org/netperf/archive/${MY_P}.tar.gz" -HOMEPAGE="http://www.netperf.org/" -LICENSE="netperf" -SLOT="0" -KEYWORDS="alpha amd64 ia64 ~ppc ppc64 sparc x86" - -IUSE="ipv6" - -DEPEND="virtual/libc >=sys-apps/sed-4" - -src_compile() { - append-flags -DDO_UNIX - use ipv6 && append-flags -DDO_IPV6 - emake CFLAGS="${CFLAGS}" || die - sed -i 's:^\(NETHOME=\).*:\1/usr/bin:' *_script -} - -src_install () { - # binaries - dosbin netserver - dobin netperf - - # init.d / conf.d - newinitd ${FILESDIR}/${PN}-2.2-init netperf - newconfd ${FILESDIR}/${PN}-2.2-conf netperf - - # man pages - newman netserver.man netserver.1 - newman netperf.man netperf.1 - - # documentation and example scripts - dodoc ACKNWLDGMNTS COPYRIGHT README Release_Notes netperf.ps - dodir /usr/share/doc/${PF}/examples - cp *_script ${D}/usr/share/doc/${PF}/examples -} diff --git a/net-analyzer/netperf/netperf-2.3.ebuild b/net-analyzer/netperf/netperf-2.3.ebuild deleted file mode 100644 index ff9d20cc6c99..000000000000 --- a/net-analyzer/netperf/netperf-2.3.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/netperf-2.3.ebuild,v 1.11 2008/01/16 20:27:16 grobian Exp $ - -inherit flag-o-matic - -if [[ $PV == *.*.* ]]; then - MY_P=${P%.*}pl${PV##*.} # convert netperf-2.2.4 => netperf-2.2pl4 - S=${WORKDIR}/${MY_P} -else - MY_P=${P} -fi - -DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." -SRC_URI="ftp://ftp.netperf.org/netperf/archive/${MY_P}.tar.gz" -HOMEPAGE="http://www.netperf.org/" -LICENSE="netperf" -SLOT="0" -KEYWORDS="alpha amd64 ia64 ~ppc ppc64 sparc x86" - -IUSE="ipv6" - -DEPEND="virtual/libc >=sys-apps/sed-4" - -src_compile() { - append-flags -DDO_UNIX - use ipv6 && append-flags -DDO_IPV6 - emake CFLAGS="${CFLAGS}" || die - sed -i 's:^\(NETHOME=\).*:\1/usr/bin:' *_script -} - -src_install () { - # binaries - dosbin netserver - dobin netperf - - # init.d / conf.d - newinitd ${FILESDIR}/${PN}-2.2-init netperf - newconfd ${FILESDIR}/${PN}-2.2-conf netperf - - # man pages - newman netserver.man netserver.1 - newman netperf.man netperf.1 - - # documentation and example scripts - dodoc ACKNWLDGMNTS COPYRIGHT README Release_Notes netperf.ps - dodir /usr/share/doc/${PF}/examples - cp *_script ${D}/usr/share/doc/${PF}/examples -} diff --git a/net-analyzer/netperf/netperf-2.4.2-r1.ebuild b/net-analyzer/netperf/netperf-2.4.2-r1.ebuild deleted file mode 100644 index 25c07575b64e..000000000000 --- a/net-analyzer/netperf/netperf-2.4.2-r1.ebuild +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/netperf-2.4.2-r1.ebuild,v 1.5 2008/01/16 20:27:16 grobian Exp $ - -WANT_AUTOCONF="latest" -inherit eutils flag-o-matic autotools - -MY_P=${P/_rc/-rc} - -DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." -#SRC_URI="ftp://ftp.netperf.org/netperf/experimental/${MY_P}.tar.gz" -SRC_URI="ftp://ftp.netperf.org/netperf/${MY_P}.tar.gz" -KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ppc64 sparc x86" - -HOMEPAGE="http://www.netperf.org/" -LICENSE="netperf" -SLOT="0" -IUSE="" - -S=${WORKDIR}/${MY_P} - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${PN}-2.4.0-gcc41.patch - epatch ${FILESDIR}/${PN}-fix-scripts.patch - eautoconf -} - -src_install () { - einstall || die - - # move netserver into sbin as we had it before 2.4 was released with its - # autoconf goodness - dodir /usr/sbin - mv ${D}/usr/{bin,sbin}/netserver || die - - # init.d / conf.d - newinitd ${FILESDIR}/${PN}-2.2-init netperf - newconfd ${FILESDIR}/${PN}-2.2-conf netperf - - # documentation and example scripts - dodoc AUTHORS ChangeLog COPYING NEWS README Release_Notes doc/netperf.pdf - dodir /usr/share/doc/${PF}/examples - #Scripts no longer get installed by einstall - cp doc/examples/*_script ${D}/usr/share/doc/${PF}/examples -} diff --git a/net-analyzer/netperf/netperf-2.4.4.ebuild b/net-analyzer/netperf/netperf-2.4.4.ebuild new file mode 100644 index 000000000000..a972dd964f85 --- /dev/null +++ b/net-analyzer/netperf/netperf-2.4.4.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/netperf/netperf-2.4.4.ebuild,v 1.1 2008/01/31 13:28:28 pva Exp $ + +inherit eutils flag-o-matic autotools + +MY_P=${P/_rc/-rc} + +DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more." +#SRC_URI="ftp://ftp.netperf.org/netperf/experimental/${MY_P}.tar.gz" +SRC_URI="ftp://ftp.netperf.org/netperf/${MY_P}.tar.gz + mirror://gentoo/netperf-2.4.4-svn_trunk_20071205.patch.bz2" +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86" + +HOMEPAGE="http://www.netperf.org/" +LICENSE="netperf" +SLOT="0" +IUSE="" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${A} + cd "${S}" + + sed -i 's:^\(#define DEBUG_LOG_FILE "\)/tmp/netperf.debug:\1/var/log/netperf.debug:' src/netserver.c + epatch "${WORKDIR}"/${P}-svn_trunk_20071205.patch + epatch "${FILESDIR}"/${PN}-2.4.0-gcc41.patch + epatch "${FILESDIR}"/${PN}-CVE-2007-1444.patch + epatch "${FILESDIR}"/${PN}-fix-scripts.patch + + # Fixing paths in scripts + sed -i -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \ + doc/examples/sctp_stream_script \ + doc/examples/tcp_range_script \ + doc/examples/tcp_rr_script \ + doc/examples/tcp_stream_script \ + doc/examples/udp_rr_script \ + doc/examples/udp_stream_script + + eautoconf +} + +src_install () { + einstall || die + + # move netserver into sbin as we had it before 2.4 was released with its + # autoconf goodness + dodir /usr/sbin + mv "${D}"/usr/{bin,sbin}/netserver || die + + # init.d / conf.d + newinitd "${FILESDIR}"/${PN}-2.2-init netperf + newconfd "${FILESDIR}"/${PN}-2.2-conf netperf + + # documentation and example scripts + dodoc AUTHORS ChangeLog NEWS README Release_Notes + dodir /usr/share/doc/${PF}/examples + #Scripts no longer get installed by einstall + cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples +} |