summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-09-14 16:18:16 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-09-14 16:18:16 +0000
commit3489501d32462fc26e8247f8e2823ba31cd7d618 (patch)
tree5c34de425538b8d8d2c61321be5c58c158e7a1d3 /sys-apps/psmisc
parentFix segfault in killall, bug #28234 (diff)
downloadgentoo-2-3489501d32462fc26e8247f8e2823ba31cd7d618.tar.gz
gentoo-2-3489501d32462fc26e8247f8e2823ba31cd7d618.tar.bz2
gentoo-2-3489501d32462fc26e8247f8e2823ba31cd7d618.zip
Fix segfault in killall, bug #28234
Diffstat (limited to 'sys-apps/psmisc')
-rw-r--r--sys-apps/psmisc/ChangeLog7
-rw-r--r--sys-apps/psmisc/Manifest4
-rw-r--r--sys-apps/psmisc/files/digest-psmisc-21.2-r42
-rw-r--r--sys-apps/psmisc/files/psmisc-21.2-fix-realloc.patch11
-rw-r--r--sys-apps/psmisc/psmisc-21.2-r4.ebuild63
5 files changed, 84 insertions, 3 deletions
diff --git a/sys-apps/psmisc/ChangeLog b/sys-apps/psmisc/ChangeLog
index ad9608cfc1a6..38550d911f21 100644
--- a/sys-apps/psmisc/ChangeLog
+++ b/sys-apps/psmisc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/psmisc
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/psmisc/ChangeLog,v 1.19 2003/08/04 21:15:06 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/psmisc/ChangeLog,v 1.20 2003/09/14 16:18:03 azarah Exp $
+
+ 14 Sep 2003; Martin Schlemmer <azarah@gentoo.org> :
+ Killall segfault if an command is longer than 128 bytes, as the realloc call
+ is not done in such an way to update the pointer that is used, thanks to bug
+ (bug #28234) submitted by Grant McDorman <grant.mcdorman@sympatico.ca>.
*psmisc-21.2-r3 (04 Aug 2003)
diff --git a/sys-apps/psmisc/Manifest b/sys-apps/psmisc/Manifest
index 7ca6d967d585..361e8dfcf7d5 100644
--- a/sys-apps/psmisc/Manifest
+++ b/sys-apps/psmisc/Manifest
@@ -1,8 +1,8 @@
MD5 e4a3fb734c6576cdda02478f89f2b101 psmisc-21.2-r1.ebuild 1205
-MD5 e37a96b66f19e48c9e8cf09cc3914853 ChangeLog 2708
+MD5 e318acd2d48c238dfa69d59de782c28b ChangeLog 2995
MD5 de03f52b87fd419ddfa42130fad38cff psmisc-21.2-r3.ebuild 1402
MD5 10b33cf9d010dc70addec4f9010321e9 psmisc-21.2-r2.ebuild 1313
-MD5 ad550f6175afb008bccce164468a87f2 psmisc-21.2-r4.ebuild 1684
+MD5 9249b5da52077c1ac28aac7d498c738d psmisc-21.2-r4.ebuild 1689
MD5 c3fc900b7ebf1f4231b1ea416d908ce2 files/psmisc-21.2-fix-realloc.patch 368
MD5 6103f4929ab117827385124493e78c77 files/digest-psmisc-21.2-r3 136
MD5 6103f4929ab117827385124493e78c77 files/digest-psmisc-21.2-r2 136
diff --git a/sys-apps/psmisc/files/digest-psmisc-21.2-r4 b/sys-apps/psmisc/files/digest-psmisc-21.2-r4
new file mode 100644
index 000000000000..cbf11a229904
--- /dev/null
+++ b/sys-apps/psmisc/files/digest-psmisc-21.2-r4
@@ -0,0 +1,2 @@
+MD5 0749017f500b171f053d7c1fd72df537 psmisc-21.2.tar.gz 258561
+MD5 68f826245b24b3cbb5bf9ac193d00f10 psmisc-21.2-selinux.patch.bz2 84457
diff --git a/sys-apps/psmisc/files/psmisc-21.2-fix-realloc.patch b/sys-apps/psmisc/files/psmisc-21.2-fix-realloc.patch
new file mode 100644
index 000000000000..4d937bd2ca88
--- /dev/null
+++ b/sys-apps/psmisc/files/psmisc-21.2-fix-realloc.patch
@@ -0,0 +1,11 @@
+--- psmisc-21.2/src/killall.c.orig 2002-09-04 18:22:39.000000000 -0400
++++ psmisc-21.2/src/killall.c 2003-09-08 23:08:01.000000000 -0400
+@@ -206,7 +206,7 @@
+ {
+ int cur_size = cmd_size;
+ cmd_size *= 2;
+- if (!realloc(&command_buf, cmd_size))
++ if (!(command_buf = realloc(command_buf, cmd_size)))
+ exit (1);
+ p = command_buf + cur_size;
+ }
diff --git a/sys-apps/psmisc/psmisc-21.2-r4.ebuild b/sys-apps/psmisc/psmisc-21.2-r4.ebuild
new file mode 100644
index 000000000000..e47efdc8adbd
--- /dev/null
+++ b/sys-apps/psmisc/psmisc-21.2-r4.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/psmisc/psmisc-21.2-r4.ebuild,v 1.1 2003/09/14 16:18:03 azarah Exp $
+
+IUSE="nls selinux"
+
+DESCRIPTION="A set of tools that use the proc filesystem"
+HOMEPAGE="http://psmisc.sourceforge.net/"
+SRC_URI="mirror://sourceforge/psmisc/${P}.tar.gz
+ selinux? mirror://gentoo/${P}-selinux.patch.bz2"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~amd64 ~ppc ~sparc ~alpha ~hppa ~arm ~mips"
+
+DEPEND=">=sys-libs/ncurses-5.2-r2
+ selinux? ( >=sys-apps/selinux-small-2003011510-r2 )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ # Necessary selinux patch
+ use selinux && epatch ${DISTDIR}/${P}-selinux.patch.bz2
+
+ # Fix gcc-3.3 compile issues.
+ # <azarah@gentoo.org> (18 May 2003)
+ epatch ${FILESDIR}/${P}-gcc33.patch
+
+ # Killall segfault if an command is longer than 128 bytes, as
+ # the realloc call is not done in such an way to update the
+ # pointer that is used, thanks to bug submitted (bug #28234) by
+ # Grant McDorman <grant.mcdorman@sympatico.ca>.
+ epatch ${FILESDIR}/${P}-fix-realloc.patch
+}
+
+src_compile() {
+ local myconf="--with-gnu-ld"
+ use nls || myconf="${myconf} --disable-nls"
+ use selinux && myconf="${myconf} --enable-flask"
+
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+ einstall || die
+ dosym killall /usr/bin/pidof
+
+ # Some packages expect these to use /usr, others to use /
+ dodir /bin
+ mv ${D}/usr/bin/* ${D}/bin/
+ cd ${D}/bin
+ for f in * ; do
+ dosym /bin/${f} /usr/bin/${f}
+ done
+
+ # We use pidof from baselayout.
+ rm -f ${D}/bin/pidof
+ dosym ../sbin/pidof /bin/pidof
+
+ dodoc ABOUT-NLS AUTHORS ChangeLog NEWS README
+}