summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2005-06-03 08:37:21 +0000
committerDaniel Black <dragonheart@gentoo.org>2005-06-03 08:37:21 +0000
commit9d114bf674f5066b07eda1affdc3643f3d546146 (patch)
tree5f236219cb243b7edb784eb41dd7e0de3b75fff1 /net-libs
parenttypo fix (diff)
downloadgentoo-2-9d114bf674f5066b07eda1affdc3643f3d546146.tar.gz
gentoo-2-9d114bf674f5066b07eda1affdc3643f3d546146.tar.bz2
gentoo-2-9d114bf674f5066b07eda1affdc3643f3d546146.zip
hardened security fix - bug #94896
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/libpcap-ringbuffer/ChangeLog9
-rw-r--r--net-libs/libpcap-ringbuffer/Manifest7
-rw-r--r--net-libs/libpcap-ringbuffer/files/digest-libpcap-ringbuffer-1.0.20050129-r11
-rw-r--r--net-libs/libpcap-ringbuffer/files/libpcap-ringbuffer-1.0.20050129-mmap-exec.patch20
-rw-r--r--net-libs/libpcap-ringbuffer/libpcap-ringbuffer-1.0.20050129-r1.ebuild65
5 files changed, 99 insertions, 3 deletions
diff --git a/net-libs/libpcap-ringbuffer/ChangeLog b/net-libs/libpcap-ringbuffer/ChangeLog
index 126229f27257..8e3f311c5516 100644
--- a/net-libs/libpcap-ringbuffer/ChangeLog
+++ b/net-libs/libpcap-ringbuffer/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-libs/libpcap-ringbuffer
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap-ringbuffer/ChangeLog,v 1.3 2005/03/24 00:56:18 vanquirius Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap-ringbuffer/ChangeLog,v 1.4 2005/06/03 08:37:21 dragonheart Exp $
+
+*libpcap-ringbuffer-1.0.20050129-r1 (03 Jun 2005)
+
+ 03 Jun 2005; Daniel Black <dragonheart@gentoo.org>
+ +files/libpcap-ringbuffer-1.0.20050129-mmap-exec.patch,
+ +libpcap-ringbuffer-1.0.20050129-r1.ebuild:
+ hardened fix for bug #94896
*libpcap-ringbuffer-1.0.20050129 (23 Mar 2005)
diff --git a/net-libs/libpcap-ringbuffer/Manifest b/net-libs/libpcap-ringbuffer/Manifest
index aa22afc0b504..5b7214e286cd 100644
--- a/net-libs/libpcap-ringbuffer/Manifest
+++ b/net-libs/libpcap-ringbuffer/Manifest
@@ -1,6 +1,9 @@
+MD5 570807ad90f810f783ad09ace5acc754 ChangeLog 996
MD5 3518cc7e500dab348a9a4aee5972d7c8 libpcap-ringbuffer-1.0.20041001.ebuild 1659
-MD5 0de5bced2c0d3a42143d82a65be94120 libpcap-ringbuffer-1.0.20050129.ebuild 1659
-MD5 fd751ae1adf37aa9b40df610dad41720 ChangeLog 757
MD5 c14eecc39f9e4d6b37b94f4e81df755d metadata.xml 257
+MD5 0de5bced2c0d3a42143d82a65be94120 libpcap-ringbuffer-1.0.20050129.ebuild 1659
+MD5 9ed577b4330d0e70019489e5ca3d20a6 libpcap-ringbuffer-1.0.20050129-r1.ebuild 1707
MD5 a515448deadd95cb78cacf175a0aeba4 files/digest-libpcap-ringbuffer-1.0.20041001 72
MD5 88de1c13f5c2a764d4613cd7070766c6 files/digest-libpcap-ringbuffer-1.0.20050129 72
+MD5 88de1c13f5c2a764d4613cd7070766c6 files/digest-libpcap-ringbuffer-1.0.20050129-r1 72
+MD5 2801bbe6917277fe63e0115dac7648b5 files/libpcap-ringbuffer-1.0.20050129-mmap-exec.patch 728
diff --git a/net-libs/libpcap-ringbuffer/files/digest-libpcap-ringbuffer-1.0.20050129-r1 b/net-libs/libpcap-ringbuffer/files/digest-libpcap-ringbuffer-1.0.20050129-r1
new file mode 100644
index 000000000000..77df015e2728
--- /dev/null
+++ b/net-libs/libpcap-ringbuffer/files/digest-libpcap-ringbuffer-1.0.20050129-r1
@@ -0,0 +1 @@
+MD5 17f5d0ea2e00d5f54f23966d453a9660 libpcap-1.0.20050129.tar.gz 601748
diff --git a/net-libs/libpcap-ringbuffer/files/libpcap-ringbuffer-1.0.20050129-mmap-exec.patch b/net-libs/libpcap-ringbuffer/files/libpcap-ringbuffer-1.0.20050129-mmap-exec.patch
new file mode 100644
index 000000000000..595a181a14e3
--- /dev/null
+++ b/net-libs/libpcap-ringbuffer/files/libpcap-ringbuffer-1.0.20050129-mmap-exec.patch
@@ -0,0 +1,20 @@
+--- pcap-ring.c.orig 2005-06-03 18:27:27.000000000 +1000
++++ pcap-ring.c 2005-06-03 18:27:50.000000000 +1000
+@@ -78,7 +78,7 @@
+ }
+
+ p->rg.buf = (void*)mmap(NULL, pgs*pg_size,
+- PROT_READ|PROT_WRITE|PROT_EXEC,
++ PROT_READ|PROT_WRITE,
+ MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
+ if ((long)p->rg.buf == -1L) {
+ perror("mmap");
+@@ -185,7 +185,7 @@
+ return -2;
+ }
+
+- p->rg.buf = (void*)mmap(0, pgs*pg_size, PROT_READ|PROT_WRITE|PROT_EXEC,
++ p->rg.buf = (void*)mmap(0, pgs*pg_size, PROT_READ|PROT_WRITE,
+ MAP_SHARED, p->fd, 0);
+ if ((long)p->rg.buf == -1L) {
+ perror("Error: Could not allocate shared memory");
diff --git a/net-libs/libpcap-ringbuffer/libpcap-ringbuffer-1.0.20050129-r1.ebuild b/net-libs/libpcap-ringbuffer/libpcap-ringbuffer-1.0.20050129-r1.ebuild
new file mode 100644
index 000000000000..4ac9cc9c2e96
--- /dev/null
+++ b/net-libs/libpcap-ringbuffer/libpcap-ringbuffer-1.0.20050129-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libpcap-ringbuffer/libpcap-ringbuffer-1.0.20050129-r1.ebuild,v 1.1 2005/06/03 08:37:21 dragonheart Exp $
+
+inherit toolchain-funcs linux-info multilib eutils
+
+MY_P=${PN:0:7}-${PV}
+
+DESCRIPTION="A libpcap version which supports MMAP mode (ringbuffer) on the linux kernel 2.[46].x"
+HOMEPAGE="http://public.lanl.gov/cpw/"
+SRC_URI="${HOMEPAGE}${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="ipv6"
+
+DEPEND="virtual/libc
+ !virtual/libpcap"
+
+PROVIDE="virtual/libpcap"
+
+S=${WORKDIR}/${MY_P}
+
+# Used in linux-info to check minium Kernel support
+CONFIG_CHECK="PACKET_MMAP"
+PACKET_MMAP_ERROR="Make sure you have PACKET_MMAP compiled in your kernel to make use of libpcap's ringbuffer feature."
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ sed -i 's:@CFLAGS@:@CFLAGS@ -fPIC:' Makefile.in || die "fPIC patch failed."
+ epatch ${FILESDIR}/${P}-mmap-exec.patch
+}
+
+src_compile() {
+ cd ${S}
+ econf `use_enable ipv6` || die "bad configure"
+ emake || die "compile problem"
+
+ # no provision for this in the Makefile, so...
+ $(tc-getCC) -Wl,-soname,libpcap.so.0 -shared -fPIC -o libpcap.so.${PV:0:3} *.o \
+ || die "couldn't make a shared lib"
+}
+
+src_install() {
+ dodir /usr/include
+ dodir /usr/$(get_libdir)
+ emake DESTDIR=${D} install || die "install problem"
+ dodoc CREDITS CHANGES FILES README* VERSION
+
+ dolib libpcap.so.${PV:0:3}
+
+ doins /usr/$(get_libdir)
+
+ for link in "" .0 .0.7 .0.8
+ do
+ dosym libpcap.so.${PV:0:3} libpcap.so${link}
+ done
+}
+
+pkg_postinst() {
+ einfo "For usage with tcpdump and further details see:"
+ einfo "/usr/share/doc/${PF}/README.ring.gz"
+}