summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/atop/ChangeLog10
-rw-r--r--sys-process/atop/atop-1.26-r1.ebuild40
-rw-r--r--sys-process/atop/files/atop-1.26-cve-2011-3618.patch35
3 files changed, 83 insertions, 2 deletions
diff --git a/sys-process/atop/ChangeLog b/sys-process/atop/ChangeLog
index d919e4fe0f0f..2f85381147e0 100644
--- a/sys-process/atop/ChangeLog
+++ b/sys-process/atop/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-process/atop
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/ChangeLog,v 1.36 2010/12/13 10:25:36 vapier Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/ChangeLog,v 1.37 2012/01/09 21:45:56 sping Exp $
+
+*atop-1.26-r1 (09 Jan 2012)
+
+ 09 Jan 2012; Sebastian Pipping <sping@gentoo.org> +atop-1.26-r1.ebuild,
+ +files/atop-1.26-cve-2011-3618.patch:
+ Integrate custom patch for CVE-2011-3618 (bug #363887)
*atop-1.26 (13 Dec 2010)
diff --git a/sys-process/atop/atop-1.26-r1.ebuild b/sys-process/atop/atop-1.26-r1.ebuild
new file mode 100644
index 000000000000..3c4a1081d705
--- /dev/null
+++ b/sys-process/atop/atop-1.26-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/atop/atop-1.26-r1.ebuild,v 1.1 2012/01/09 21:45:56 sping Exp $
+
+EAPI="3"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Resource-specific view of processes"
+HOMEPAGE="http://www.atoptool.nl/"
+SRC_URI="http://www.atoptool.nl/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~x86"
+IUSE=""
+
+DEPEND="sys-process/acct"
+
+src_prepare() {
+ sed -i \
+ -e '/^CFLAGS/s: = -O : += :' \
+ -e '/^LDFLAGS/s: = : += :' \
+ -e 's:\<cc\>:$(CC):' \
+ Makefile
+ tc-export CC
+ cp "${FILESDIR}"/atop.rc atop.init
+ chmod a+rx atop.init
+ sed -i 's: root : :' atop.cron #191926
+
+ epatch "${FILESDIR}"/${P}-cve-2011-3618.patch # bug 363887
+}
+
+src_install() {
+ emake DESTDIR="${D}" INIPATH=/etc/init.d install || die
+ # useless -${PV} copies ?
+ rm -f "${D}"/usr/bin/atop*-${PV}
+ dodoc README "${D}"/etc/cron.d/*
+ rm -r "${D}"/etc/cron.d || die
+}
diff --git a/sys-process/atop/files/atop-1.26-cve-2011-3618.patch b/sys-process/atop/files/atop-1.26-cve-2011-3618.patch
new file mode 100644
index 000000000000..de8ed10da167
--- /dev/null
+++ b/sys-process/atop/files/atop-1.26-cve-2011-3618.patch
@@ -0,0 +1,35 @@
+--- rawlog.c 2012-01-09 20:31:52.821352486 +0100
++++ rawlog.c 2012-01-09 22:32:48.218647541 +0100
+@@ -565,20 +565,25 @@
+ ** compressed raw file to be decompressed via gunzip
+ */
+ fprintf(stderr, "Decompressing logfile ....\n");
++ snprintf(tmpname2, sizeof tmpname2, "/tmp/atopwrkXXXXXX");
++ rawfd = mkstemp(tmpname2);
++ if (rawfd == -1)
++ {
++ fprintf(stderr, "%s - ", rawname);
++ perror("creating decompression temp file");
++ cleanstop(7);
++ }
+
+- snprintf(tmpname2, sizeof tmpname2, "/tmp/atopwrk%d", getpid());
+ snprintf(command, sizeof command, "gunzip -c %s > %s",
+ tmpname1, tmpname2);
+- system (command);
++ const int system_res = system (command);
++ unlink(tmpname2);
+
+- if ( (rawfd = open(tmpname2, O_RDONLY)) == -1)
++ if (system_res)
+ {
+- fprintf(stderr, "%s - ", rawname);
+- perror("open decompressed raw file");
++ fprintf(stderr, "%s - gunzip failed", rawname);
+ cleanstop(7);
+ }
+-
+- unlink(tmpname2);
+ }
+
+ /*