diff options
author | Daniel Black <dragonheart@gentoo.org> | 2005-06-03 08:37:21 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2005-06-03 08:37:21 +0000 |
commit | 2c700b407bdcae1e213ce99fa4bc6277b84831ee (patch) | |
tree | 90203454ad8e52306e599de77e57736ca8adfbcf /net-libs/libpcap-ringbuffer | |
parent | typo fix (diff) | |
download | historical-2c700b407bdcae1e213ce99fa4bc6277b84831ee.tar.gz historical-2c700b407bdcae1e213ce99fa4bc6277b84831ee.tar.bz2 historical-2c700b407bdcae1e213ce99fa4bc6277b84831ee.zip |
hardened security fix - bug #94896
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'net-libs/libpcap-ringbuffer')
5 files changed, 109 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..e0cf1f8bb4d5 100644 --- a/net-libs/libpcap-ringbuffer/Manifest +++ b/net-libs/libpcap-ringbuffer/Manifest @@ -1,6 +1,19 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 e49089ecce4e38b96d3be7d3c959a898 ChangeLog 997 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 47c5cd5700c22ccfc2baf90fb00c6966 libpcap-ringbuffer-1.0.20050129-r1.ebuild 1711 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 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.1 (GNU/Linux) + +iD8DBQFCoBbWmdTrptrqvGERAje/AJ9z60J1os5yGnLgl7Kq/WPXKeJSLgCdEFCr +G6pGCRDKXEXrxzRKNhaRMDI= +=xS9t +-----END PGP SIGNATURE----- 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" +} |