summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2006-01-15 22:16:59 +0000
committerPeter Volkov <pva@gentoo.org>2006-01-15 22:16:59 +0000
commit37f3f8262a4abad6ddc99231d8e05b274ba08dcc (patch)
treee384a7bcd27bae13c159a89508e013e0b3070e29 /net-misc/ip-sentinel
parentFix gcc-4.1 patch by Gene Seto <geneseto AT hotmail DOT com>; bug #118734 (diff)
downloadgentoo-2-37f3f8262a4abad6ddc99231d8e05b274ba08dcc.tar.gz
gentoo-2-37f3f8262a4abad6ddc99231d8e05b274ba08dcc.tar.bz2
gentoo-2-37f3f8262a4abad6ddc99231d8e05b274ba08dcc.zip
Initial bump.
(Portage version: 2.0.53)
Diffstat (limited to 'net-misc/ip-sentinel')
-rw-r--r--net-misc/ip-sentinel/ChangeLog11
-rw-r--r--net-misc/ip-sentinel/Manifest7
-rw-r--r--net-misc/ip-sentinel/files/digest-ip-sentinel-0.121
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.cfg11
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.conf.d11
-rw-r--r--net-misc/ip-sentinel/files/ip-sentinel.init39
-rw-r--r--net-misc/ip-sentinel/ip-sentinel-0.12.ebuild72
-rw-r--r--net-misc/ip-sentinel/metadata.xml16
8 files changed, 168 insertions, 0 deletions
diff --git a/net-misc/ip-sentinel/ChangeLog b/net-misc/ip-sentinel/ChangeLog
new file mode 100644
index 000000000000..849b7f44e9d9
--- /dev/null
+++ b/net-misc/ip-sentinel/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for net-misc/ip-sentinel
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ip-sentinel/ChangeLog,v 1.1 2006/01/15 22:16:59 pva Exp $
+
+*ip-sentinel-0.12 (15 Jan 2006)
+
+ 15 Jan 2006; Peter Volkov <pva@gentoo.org> +files/ip-sentinel.cfg,
+ +files/ip-sentinel.conf.d, +files/ip-sentinel.init, +metadata.xml,
+ +ip-sentinel-0.12.ebuild:
+ Initial bump.
+
diff --git a/net-misc/ip-sentinel/Manifest b/net-misc/ip-sentinel/Manifest
new file mode 100644
index 000000000000..ac30ce58785f
--- /dev/null
+++ b/net-misc/ip-sentinel/Manifest
@@ -0,0 +1,7 @@
+MD5 baf55e2d661ed2451aa3027a641a4d2f ChangeLog 337
+MD5 196e4c59b0c8b9af825b26b05c58f01a files/digest-ip-sentinel-0.12 69
+MD5 204bbb3a56048aff8085af335043e7f4 files/ip-sentinel.cfg 272
+MD5 264a00a7107a2ad3d6e4f3d6a939e742 files/ip-sentinel.conf.d 350
+MD5 f82279353c12964556347745d5ac5767 files/ip-sentinel.init 870
+MD5 65487009cdc38580c0960f6de583fb1e ip-sentinel-0.12.ebuild 2264
+MD5 627b588df7cff1f95032d83d410a6a7d metadata.xml 632
diff --git a/net-misc/ip-sentinel/files/digest-ip-sentinel-0.12 b/net-misc/ip-sentinel/files/digest-ip-sentinel-0.12
new file mode 100644
index 000000000000..7638fa312f7e
--- /dev/null
+++ b/net-misc/ip-sentinel/files/digest-ip-sentinel-0.12
@@ -0,0 +1 @@
+MD5 eb83cda53fcfed7d9826eab1640a2d2a ip-sentinel-0.12.tar.bz2 165803
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.cfg b/net-misc/ip-sentinel/files/ip-sentinel.cfg
new file mode 100644
index 000000000000..d0d2fbc8d3f3
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel.cfg
@@ -0,0 +1,11 @@
+# This is configuration file for ip-sentinel
+
+# Next line blocks all computers inside network
+0.0.0.0/0
+
+# Now please add computers that are allowed to communicate
+# ! denotes not to block
+!10.10.146.1
+!10.10.146.236@de:ad:be:ef
+
+# see "man ip-sentinel" for more details.
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.conf.d b/net-misc/ip-sentinel/files/ip-sentinel.conf.d
new file mode 100644
index 000000000000..d9d262d52b0a
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel.conf.d
@@ -0,0 +1,11 @@
+# Configure which interface for ip-sentinel to listen on.
+IFACE="eth0"
+
+# Insert any other options needed
+OPTS=""
+
+# If you wish to run dhcp in a chroot, run:
+# emerge --config =net-misc/<ip-sentinel-version>
+# and un-comment the following line.
+# You can specify a different chroot directory but MAKE SURE it's empty.
+# CHROOT="/chroot/ip-sentinel"
diff --git a/net-misc/ip-sentinel/files/ip-sentinel.init b/net-misc/ip-sentinel/files/ip-sentinel.init
new file mode 100644
index 000000000000..dce64a188f27
--- /dev/null
+++ b/net-misc/ip-sentinel/files/ip-sentinel.init
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ip-sentinel/files/ip-sentinel.init,v 1.1 2006/01/15 22:16:59 pva Exp $
+
+CFG_FILE="/etc/ip-sentinel.cfg"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f "${CFG_FILE}" ] ; then
+ eerror "File ${CFG_FILE} does not exists!"
+ return 1
+ fi
+
+ if [ -n "${CHROOT}" ] ; then
+ local_opts="--user ipsentinel --group ipsentinel -r ${CHROOT}"
+ else
+ local_opts="--user ipsentinel --group ipsentinel -r /"
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ip-sentinel..."
+ start-stop-daemon --start --quiet --exec /usr/sbin/ip-sentinel -- --ipfile ${CFG_FILE} ${local_opts} $OPTS $IFACE &
+ eend $? "Failed to start ip-sentinel"
+}
+
+stop() {
+ ebegin "Stoping ip-sentinel..."
+ start-stop-daemon --stop --quiet --pidfile /var/run/ip-sentinel.run
+ eend $? "Failed to stop ip-sentinel"
+}
+
diff --git a/net-misc/ip-sentinel/ip-sentinel-0.12.ebuild b/net-misc/ip-sentinel/ip-sentinel-0.12.ebuild
new file mode 100644
index 000000000000..7ef33353a65e
--- /dev/null
+++ b/net-misc/ip-sentinel/ip-sentinel-0.12.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ip-sentinel/ip-sentinel-0.12.ebuild,v 1.1 2006/01/15 22:16:59 pva Exp $
+
+inherit eutils
+
+DESCRIPTION="Prevent unauthorized usage of IPs within the local ethernet broadcastdomain by giving an answer to ARP-requests"
+HOMEPAGE="http://www.nongnu.org/ip-sentinel/"
+SRC_URI="http://savannah.nongnu.org/download/ip-sentinel/${P}.tar.bz2"
+LICENSE="GPL-2"
+
+SLOT="0"
+
+KEYWORDS="~x86"
+
+IUSE=""
+DEPEND=""
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/ip-sentinel.init ip-sentinel
+ insinto /etc/conf.d
+ newins "${FILESDIR}/ip-sentinel.conf.d" ip-sentinel
+ insinto /etc
+ newins "${FILESDIR}/ip-sentinel.cfg" ip-sentinel.cfg
+}
+
+pkg_preinst() {
+ enewgroup ipsentinel || die "Failed to add group ipsentinel"
+ enewuser ipsentinel -1 -1 -1 ipsentinel || die "Failed to add user ipsentinel"
+}
+
+pkg_postinst() {
+ einfo "You can edit /etc/conf.d/ip-sentinel to customize startup daemon"
+ einfo "settings."
+ einfo
+ einfo "Default ip-sentinel config is in /etc/ip-sentinel.cfg"
+ einfo
+ einfo "The ip-sentinel ebuild has chroot support."
+ einfo "If you like to run ip-sentinel in chroot AND this is a new install OR"
+ einfo "your ip-sentinel doesn't already run in chroot, simply run:"
+ einfo "emerge --config =${CATEGORY}/${PF}"
+ einfo "Before running the above command you might want to change the chroot"
+ einfo "dir in /etc/conf.d/ip-sentinel, otherwise /chroot/ip-sentinel will be used."
+ echo
+ ewarn "And please! DO NOT START THIS DAEMON thoughtlessly."
+ ewarn "If you DO this will BLOCK ALL communication inside your ethernet"
+ ewarn "segment!!! If you have any doubts do not start ip-sentinel."
+}
+
+pkg_config() {
+ CHROOT=`sed -n 's/^[[:blank:]]\?CHROOT="\([^"]\+\)"/\1/p' /etc/conf.d/ip-sentinel 2>/dev/null`
+
+ if [ ! -d "${CHROOT:=/chroot/ip-sentinel}" ] ; then
+ ebegin "Setting up the chroot directory"
+ mkdir -m 0755 -p "${CHROOT}/etc"
+ cp -R /etc/ip-sentinel.cfg "${CHROOT}/etc"
+ eend
+
+ if [ "`grep '^#[[:blank:]]\?CHROOT' /etc/conf.d/ip-sentinel`" ] ; then
+ sed -e '/^#[[:blank:]]\?CHROOT/s/^#[[:blank:]]\?//' \
+ -i /etc/conf.d/ip-sentinel
+ fi
+ else
+ eerror
+ eerror "${CHROOT} already exists. Quitting."
+ eerror
+ fi
+}
diff --git a/net-misc/ip-sentinel/metadata.xml b/net-misc/ip-sentinel/metadata.xml
new file mode 100644
index 000000000000..48e4500868a6
--- /dev/null
+++ b/net-misc/ip-sentinel/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<maintainer>
+ <email>pva@gentoo.org</email>
+ <name>Peter Volkov</name>
+</maintainer>
+<longdescription>
+This program tries to prevent unauthorized usage of IPs within the local
+ethernet broadcastdomain by giving an answer to ARP-requests. After receiving
+such a faked reply, the requesting party stores the told MAC in its ARP-table
+and will send future packets to this MAC. Because this MAC is invalid, the host
+with the invalid IP can not be reached.
+</longdescription>
+</pkgmetadata>