summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris White <chriswhite@gentoo.org>2005-11-30 10:12:29 +0000
committerChris White <chriswhite@gentoo.org>2005-11-30 10:12:29 +0000
commit39b02842acda66dfe551bdaedcc6567c32c82859 (patch)
tree3e7a7b83af17dd31c5485b54aa5d3078aae87381 /net-analyzer/mwcollect
parent*** empty log message *** (diff)
downloadhistorical-39b02842acda66dfe551bdaedcc6567c32c82859.tar.gz
historical-39b02842acda66dfe551bdaedcc6567c32c82859.tar.bz2
historical-39b02842acda66dfe551bdaedcc6567c32c82859.zip
Diffstat (limited to 'net-analyzer/mwcollect')
-rw-r--r--net-analyzer/mwcollect/files/digest-mwcollect-3.0.01
-rw-r--r--net-analyzer/mwcollect/files/mwcollect-3.0.0-capacity.patch11
-rw-r--r--net-analyzer/mwcollect/mwcollect-3.0.0.ebuild64
3 files changed, 76 insertions, 0 deletions
diff --git a/net-analyzer/mwcollect/files/digest-mwcollect-3.0.0 b/net-analyzer/mwcollect/files/digest-mwcollect-3.0.0
new file mode 100644
index 000000000000..4c6eec4c16b3
--- /dev/null
+++ b/net-analyzer/mwcollect/files/digest-mwcollect-3.0.0
@@ -0,0 +1 @@
+MD5 e36833c7f9da5e485c235eb9de266444 mwcollect-3.0.0.tar.bz2 53294
diff --git a/net-analyzer/mwcollect/files/mwcollect-3.0.0-capacity.patch b/net-analyzer/mwcollect/files/mwcollect-3.0.0-capacity.patch
new file mode 100644
index 000000000000..880f14fbd601
--- /dev/null
+++ b/net-analyzer/mwcollect/files/mwcollect-3.0.0-capacity.patch
@@ -0,0 +1,11 @@
+--- src/core/mwcollect.cpp.old 2005-11-01 01:51:39.000000000 +0900
++++ src/core/mwcollect.cpp 2005-11-01 01:51:52.000000000 +0900
+@@ -284,7 +284,7 @@
+ #ifdef LINUX_FLAVOURED
+ { // we still may need to bind ports < 1024 / create raw sockets
+ cap_t capCapabilities = cap_init();
+- cap_value_t cvValues[] = { CAP_NET_RAW, CAP_NET_BIND_SERVICE, };
++ cap_value_t cvValues[] = { CAP_NET_RAW, CAP_NET_BIND_SERVICE, CAP_SETUID, };
+
+ cap_set_flag(capCapabilities, CAP_PERMITTED, sizeof(cvValues) / sizeof(cap_value_t), cvValues, CAP_SET);
+ cap_set_flag(capCapabilities, CAP_INHERITABLE, sizeof(cvValues) / sizeof(cap_value_t), cvValues, CAP_SET);
diff --git a/net-analyzer/mwcollect/mwcollect-3.0.0.ebuild b/net-analyzer/mwcollect/mwcollect-3.0.0.ebuild
new file mode 100644
index 000000000000..41bc69b39fe5
--- /dev/null
+++ b/net-analyzer/mwcollect/mwcollect-3.0.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/mwcollect/mwcollect-3.0.0.ebuild,v 1.1.1.1 2005/11/30 10:12:29 chriswhite Exp $
+
+inherit eutils
+
+DESCRIPTION="mwcollect collects worms and other autonomous spreading malware"
+HOMEPAGE="http://www.mwcollect.org/"
+SRC_URI="http://download.mwcollect.org/${P}.tar.bz2"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~ppc ~x86"
+IUSE="debug"
+
+DEPEND="dev-libs/libpcre
+ net-misc/curl
+ >=sys-libs/libcap-1"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ sed -i \
+ -e "s:CXXFLAGS += -I./src/include:CXXFLAGS += ${CXXFLAGS} -I./src/include:" \
+ Makefile || die "custom CFLAGS patching failed"
+
+ sed -i \
+ -e "s:\$(MODULE_OBJ) \$(LDFLAGS):\$(MODULE_OBJ) \$(LDFLAGS) -fPIC:" \
+ Makefile.MODULE || die "pic patching failed"
+
+ sed -i \
+ -e "s:%loadModule(\":%loadModule(\"\/usr\/lib\/mwcollect\/:g" \
+ conf/mwcollect.conf || die "module load directory failed"
+
+ # sets CAP_SETUID for setresuid
+ epatch "${FILESDIR}"/${P}-capacity.patch
+}
+
+src_compile() {
+ if use debug
+ then
+ emake DEBUG="y" || die "Make failed"
+ else
+ emake || die "Make failed"
+ fi
+}
+
+src_install() {
+ dosbin bin/mwcollectd
+ insinto /usr/$(get_libdir)/mwcollect
+ doins bin/modules/*
+
+ insinto /etc/mwcollect
+ doins conf/* \
+ || die "config file installation failed"
+
+ dodoc README* doc/core-design.txt
+ mv doc/mwcollectd.1.man doc/mwcollectd.1
+ doman doc/mwcollectd.1
+
+ newinitd ${FILESDIR}/initd mwcollectd
+ insinto /etc/conf.d
+ newins ${FILESDIR}/confd mwcollectd
+}