diff options
author | Marcelo Góes <vanquirius@gentoo.org> | 2005-06-19 01:54:40 +0000 |
---|---|---|
committer | Marcelo Góes <vanquirius@gentoo.org> | 2005-06-19 01:54:40 +0000 |
commit | b381ca75123c83a0a8d432b13a4b9eae58181ec1 (patch) | |
tree | 135ddc31c5dbb84c00d590b67218b7ab4d740c0b /net-analyzer/p0f | |
parent | masked on amd64 due to coding errors (ref bug #94288) (diff) | |
download | gentoo-2-b381ca75123c83a0a8d432b13a4b9eae58181ec1.tar.gz gentoo-2-b381ca75123c83a0a8d432b13a4b9eae58181ec1.tar.bz2 gentoo-2-b381ca75123c83a0a8d432b13a4b9eae58181ec1.zip |
bug 91873
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-analyzer/p0f')
-rw-r--r-- | net-analyzer/p0f/ChangeLog | 9 | ||||
-rw-r--r-- | net-analyzer/p0f/Manifest | 4 | ||||
-rw-r--r-- | net-analyzer/p0f/files/digest-p0f-2.0.5-r1 | 1 | ||||
-rw-r--r-- | net-analyzer/p0f/files/p0f.confd | 3 | ||||
-rwxr-xr-x | net-analyzer/p0f/files/p0f.initd2 | 38 | ||||
-rw-r--r-- | net-analyzer/p0f/p0f-2.0.5-r1.ebuild | 51 |
6 files changed, 105 insertions, 1 deletions
diff --git a/net-analyzer/p0f/ChangeLog b/net-analyzer/p0f/ChangeLog index 3c29dec40341..62d0d2080d8f 100644 --- a/net-analyzer/p0f/ChangeLog +++ b/net-analyzer/p0f/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-analyzer/p0f # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/ChangeLog,v 1.22 2005/05/14 22:07:42 vanquirius Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/ChangeLog,v 1.23 2005/06/19 01:54:40 vanquirius Exp $ + +*p0f-2.0.5-r1 (19 Jun 2005) + + 19 Jun 2005; Marcelo Goes <vanquirius@gentoo.org> +files/p0f.initd2, + +files/p0f.confd, +p0f-2.0.5-r1.ebuild: + Adding p0f.confd and modified init script to use it. Fixes bug 91873. Thanks + to Lorinc Czegledi <lorinc.czegledi@mail.cpst.hu>. 14 May 2005; Marcelo Goes <vanquirius@gentoo.org> -files/p0f-1.8.2-makefile.patch, -files/p0f-1.8.2.rc: diff --git a/net-analyzer/p0f/Manifest b/net-analyzer/p0f/Manifest index 566f5e7a2320..ad0636dd5215 100644 --- a/net-analyzer/p0f/Manifest +++ b/net-analyzer/p0f/Manifest @@ -1,7 +1,11 @@ MD5 6f6efeb6086e235a1e2d90154257404b p0f-2.0.3.ebuild 923 +MD5 70152881d213e859ee6de4b62a3903f4 p0f-2.0.5-r1.ebuild 1357 MD5 11e7943bc6ddf504e29b346c4c1334d1 p0f-2.0.5.ebuild 1142 MD5 e780ecb206a28c58d4e077275c4e5e9b ChangeLog 2601 MD5 a6504b2ab3f5f778d46643a087162f71 metadata.xml 250 +MD5 393eeebe57dc144d2d5c60ccb33f96e6 files/digest-p0f-2.0.5-r1 58 MD5 d68117a6108bcd2769ac8128cec37896 files/digest-p0f-2.0.3 58 MD5 393eeebe57dc144d2d5c60ccb33f96e6 files/digest-p0f-2.0.5 58 +MD5 8fe459dee83e15b59437fa835791ec61 files/p0f.initd2 1323 +MD5 c062c66a4d1e2fd8c697ef9283764b8e files/p0f.confd 67 MD5 0c97d34501b34ec11763fde7fc38dac9 files/p0f.initd 1270 diff --git a/net-analyzer/p0f/files/digest-p0f-2.0.5-r1 b/net-analyzer/p0f/files/digest-p0f-2.0.5-r1 new file mode 100644 index 000000000000..07d6ee7ea1cd --- /dev/null +++ b/net-analyzer/p0f/files/digest-p0f-2.0.5-r1 @@ -0,0 +1 @@ +MD5 78235749e8ada6ad2b16b40fe15081f6 p0f-2.0.5.tgz 130002 diff --git a/net-analyzer/p0f/files/p0f.confd b/net-analyzer/p0f/files/p0f.confd new file mode 100644 index 000000000000..ae3a068cebad --- /dev/null +++ b/net-analyzer/p0f/files/p0f.confd @@ -0,0 +1,3 @@ +P0FLOGFILE=/var/log/p0f-audit.log +P0FDEVICE=eth0 +P0FOPTIONS="-tdlo" diff --git a/net-analyzer/p0f/files/p0f.initd2 b/net-analyzer/p0f/files/p0f.initd2 new file mode 100755 index 000000000000..f32f11ca82c0 --- /dev/null +++ b/net-analyzer/p0f/files/p0f.initd2 @@ -0,0 +1,38 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/files/p0f.initd2,v 1.1 2005/06/19 01:54:40 vanquirius Exp $ + +start() { + ebegin "Starting p0f" + # The 'tcp and tcp[13] & 2 = 2' requires at least syn set. + # An alternative would be 'tcp and tcp[13] & 0x3f = 2', which + # is syn and no other major flags (but ECN enabled packets are OK) + if [ -z "$BpfFilter" ]; then + BpfFilter='tcp and tcp[13] & 2 = 2' + else + BpfFilter="$BpfFilter and tcp and tcp[13] & 2 = 2" + fi + + # The command in backticks returns all the local IP addresses on this machine. + for OneIP in `/sbin/ifconfig 2>/dev/null | grep 'inet addr' | sed -e 's/.*addr://' -e 's/ .*//'` ; do + BpfFilter="$BpfFilter and not src host $OneIP" + done + + # Create a lock file. + mkdir -p /var/lock/subsys + touch /var/lock/subsys/p0f + + # Start up p0f and filter out all packets originating from any of this machines IP's. + einfo "Logfile: ${P0FLOGFILE}" + start-stop-daemon --start --quiet --exec /usr/sbin/p0f -- -i "${P0FDEVICE}" \ + "${P0FOPTIONS}" "${P0FLOGFILE}" "${BpfFilter}" >> "/var/log/p0f" 2>&1 & + eend ${?} +} + +stop() { + ebegin "Stopping p0f" + start-stop-daemon --stop --quiet --exec /usr/sbin/p0f + rm -f /var/lock/subsys/p0f + eend ${?} +} diff --git a/net-analyzer/p0f/p0f-2.0.5-r1.ebuild b/net-analyzer/p0f/p0f-2.0.5-r1.ebuild new file mode 100644 index 000000000000..2c3429486311 --- /dev/null +++ b/net-analyzer/p0f/p0f-2.0.5-r1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/p0f/p0f-2.0.5-r1.ebuild,v 1.1 2005/06/19 01:54:40 vanquirius Exp $ + +inherit eutils + +DESCRIPTION="p0f performs passive OS detection based on SYN packets." +HOMEPAGE="http://lcamtuf.coredump.cx/p0f.shtml" +SRC_URI="http://lcamtuf.coredump.cx/p0f/${P}.tgz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~x86 ~amd64 ~sparc ~ppc-macos" +IUSE="static" + +DEPEND="virtual/libpcap" + +S="${WORKDIR}/${PN}" + +src_unpack() { + unpack ${A} && cd ${S} + sed -i 's;#include <net/bpf.h>;;' p0f.c || die "sed p0f.c failed" + sed -i -e 's|^\(all: $(FILE)\).*$|\1|' \ + -e "s|^\(CFLAGS.*=\).*$|\1${CFLAGS}|" mk/* || die "sed makefiles failed" +} + +src_compile() { + local static + use static && static="static" + emake ${static} || die "emake ${static} failed" +} + +src_install () { + use static && mv p0f-static p0f + dosbin p0f p0frep || die + + insinto /etc/p0f + doins p0f.fp p0fa.fp p0fr.fp + + doman p0f.1 || die + cd doc + dodoc ChangeLog CREDITS KNOWN_BUGS README TODO + + insinto /etc/conf.d ; newins ${FILESDIR}/${PN}.confd ${PN} + newinitd ${FILESDIR}/${PN}.initd2 ${PN} || die "newinitd failed" +} + +pkg_postinst(){ + einfo "Adjust /etc/conf.d/p0f to your liking before using the" + einfo "init script. For more information on options, read man p0f." +} |