summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2010-01-11 08:15:28 +0000
committerBenedikt Boehm <hollow@gentoo.org>2010-01-11 08:15:28 +0000
commitb11919955eeebec8db585ef0a258453e1450a9b3 (patch)
treef1a783054aeb939f3a5d72c445c1b5cf36bd54a5 /app-admin
parentcleanup (diff)
downloadgentoo-2-b11919955eeebec8db585ef0a258453e1450a9b3.tar.gz
gentoo-2-b11919955eeebec8db585ef0a258453e1450a9b3.tar.bz2
gentoo-2-b11919955eeebec8db585ef0a258453e1450a9b3.zip
fix buffer overflow wrt #287332
(Portage version: 2.2_rc61/cvs/Linux i686)
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/apachetop/ChangeLog10
-rw-r--r--app-admin/apachetop/apachetop-0.12.6-r1.ebuild44
-rw-r--r--app-admin/apachetop/files/apachetop-0.12.6-maxpathlen.patch39
3 files changed, 91 insertions, 2 deletions
diff --git a/app-admin/apachetop/ChangeLog b/app-admin/apachetop/ChangeLog
index d8f1af5b9091..1309b989e02d 100644
--- a/app-admin/apachetop/ChangeLog
+++ b/app-admin/apachetop/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-admin/apachetop
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/apachetop/ChangeLog,v 1.43 2008/02/23 20:26:07 hollow Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/apachetop/ChangeLog,v 1.44 2010/01/11 08:15:27 hollow Exp $
+
+*apachetop-0.12.6-r1 (11 Jan 2010)
+
+ 11 Jan 2010; Benedikt Böhm <hollow@gentoo.org>
+ +apachetop-0.12.6-r1.ebuild, +files/apachetop-0.12.6-maxpathlen.patch:
+ fix buffer overflow wrt #287332
23 Feb 2008; Benedikt Böhm <hollow@gentoo.org>
+files/apachetop-0.12.6-configure.patch, -files/CAN-2005-2660.patch,
diff --git a/app-admin/apachetop/apachetop-0.12.6-r1.ebuild b/app-admin/apachetop/apachetop-0.12.6-r1.ebuild
new file mode 100644
index 000000000000..3a05a87863b9
--- /dev/null
+++ b/app-admin/apachetop/apachetop-0.12.6-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/apachetop/apachetop-0.12.6-r1.ebuild,v 1.1 2010/01/11 08:15:27 hollow Exp $
+
+EAPI="2"
+
+inherit eutils autotools
+
+DESCRIPTION="A realtime Apache log analyzer"
+HOMEPAGE="http://www.webta.org/projects/apachetop"
+SRC_URI="http://www.webta.org/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~mips ~ppc ~sparc ~x86"
+IUSE="fam pcre adns"
+
+DEPEND="fam? ( virtual/fam )
+ pcre? ( dev-libs/libpcre )
+ adns? ( net-libs/adns )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc41.patch
+ epatch "${FILESDIR}"/${P}-configure.patch
+ epatch "${FILESDIR}"/${P}-maxpathlen.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-logfile=/var/log/apache2/access_log \
+ $(use_with fam) \
+ $(use_with pcre) \
+ $(use_with adns)
+}
+
+src_compile() {
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO
+}
diff --git a/app-admin/apachetop/files/apachetop-0.12.6-maxpathlen.patch b/app-admin/apachetop/files/apachetop-0.12.6-maxpathlen.patch
new file mode 100644
index 000000000000..b648b07cbfc5
--- /dev/null
+++ b/app-admin/apachetop/files/apachetop-0.12.6-maxpathlen.patch
@@ -0,0 +1,39 @@
+Patch by Robert Scheck <robert@fedoraproject.org> for apachetop <= 0.12.6, which
+adds some includes in order to have a real change to get MAXPATHLEN defined with
+a valid value. Once MAXPATHLEN really gets filled with 128, it will just cause a
+buffer overflow.
+
+See Red Hat Bugzilla #446199 (https://bugzilla.redhat.com/show_bug.cgi?id=446199)
+for more information. This patch should solve the mentioned bug report and should
+be sane enough to get included by upstream of apachetop for the next release. It
+is important to run autoheader before ./configure to get these changes activated.
+
+--- apachetop-0.12.6/configure.ac 2005-10-27 18:39:25.000000000 +0200
++++ apachetop-0.12.6/configure.ac.maxpathlen 2008-06-21 16:00:38.000000000 +0200
+@@ -34,7 +34,8 @@
+ # Checks for header files.
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h \
+- string.h strings.h sys/socket.h time.h sys/time.h])
++ string.h strings.h sys/socket.h time.h sys/time.h \
++ limits.h sys/param.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ #AC_HEADER_STDBOOL # not in 2.53?
+--- apachetop-0.12.6/src/apachetop.h 2005-10-15 18:10:01.000000000 +0200
++++ apachetop-0.12.6/src/apachetop.h.maxpatlen 2008-06-21 16:02:00.000000000 +0200
+@@ -89,8 +89,12 @@
+ #define getMIN(a,b) (a < b ? a : b)
+ #define getMAX(a,b) (a > b ? a : b)
+
+-#ifndef MAXPATHLEN
+-# define MAXPATHLEN 128
++#ifdef HAVE_SYS_PARAM_H
++# include <sys/param.h>
++#endif
++
++#if HAVE_LIMITS_H
++# include <limits.h>
+ #endif
+
+ /* upon startup, each input file is put into an element of this array,