summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Vroon <chainsaw@gentoo.org>2008-06-10 10:47:45 +0000
committerTony Vroon <chainsaw@gentoo.org>2008-06-10 10:47:45 +0000
commit5575f0b2c2a761c1a5afa0ef439599d602d33bb3 (patch)
tree69ec350864c82be7bca28f9888b8f58503f236f5 /net-misc/iputils
parentAdd USE=SECURITY_HAZARD for net-misc/iputils. (diff)
downloadgentoo-2-5575f0b2c2a761c1a5afa0ef439599d602d33bb3.tar.gz
gentoo-2-5575f0b2c2a761c1a5afa0ef439599d602d33bb3.tar.bz2
gentoo-2-5575f0b2c2a761c1a5afa0ef439599d602d33bb3.zip
Introduce USE=SECURITY_HAZARD which allows non-root users to floodping. This can be useful in some IXP/ISP environments where 10Gbit fibre links have to be tested. As the name suggests, it should not be enabled unless you know it makes sense for your situation.
(Portage version: 2.1.5.4)
Diffstat (limited to 'net-misc/iputils')
-rw-r--r--net-misc/iputils/ChangeLog12
-rw-r--r--net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch11
-rw-r--r--net-misc/iputils/iputils-20070202.ebuild4
-rw-r--r--net-misc/iputils/iputils-20071127-r2.ebuild78
4 files changed, 102 insertions, 3 deletions
diff --git a/net-misc/iputils/ChangeLog b/net-misc/iputils/ChangeLog
index afe7326ab1a5..3f8475ab2de7 100644
--- a/net-misc/iputils/ChangeLog
+++ b/net-misc/iputils/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-misc/iputils
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.74 2008/04/20 20:56:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.75 2008/06/10 10:47:44 chainsaw Exp $
+
+*iputils-20071127-r2 (10 Jun 2008)
+
+ 10 Jun 2008; <chainsaw@gentoo.org>
+ +files/iputils-20071127-nonroot-floodping.patch,
+ +iputils-20071127-r2.ebuild:
+ Introduce USE=SECURITY_HAZARD which allows non-root users to floodping.
+ This can be useful in some IXP/ISP environments where 10Gbit fibre links
+ have to be tested. As the name suggests, it should not be enabled unless
+ you know it makes sense for your situation.
*iputils-20071127-r1 (20 Apr 2008)
diff --git a/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch b/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch
new file mode 100644
index 000000000000..cae87791dc21
--- /dev/null
+++ b/net-misc/iputils/files/iputils-20071127-nonroot-floodping.patch
@@ -0,0 +1,11 @@
+--- iputils-s20071127/ping_common.h.orig 2008-06-10 11:16:06.000000000 +0100
++++ iputils-s20071127/ping_common.h 2008-06-10 11:16:18.000000000 +0100
+@@ -28,7 +28,7 @@
+
+ #define MAXWAIT 10 /* max seconds to wait for response */
+ #define MININTERVAL 10 /* Minimal interpacket gap */
+-#define MINUSERINTERVAL 200 /* Minimal allowed interval for non-root */
++#define MINUSERINTERVAL 0 /* Minimal allowed interval for non-root */
+
+ #define SCHINT(a) (((a) <= MININTERVAL) ? MININTERVAL : (a))
+
diff --git a/net-misc/iputils/iputils-20070202.ebuild b/net-misc/iputils/iputils-20070202.ebuild
index 980eb061a021..1e14432119e6 100644
--- a/net-misc/iputils/iputils-20070202.ebuild
+++ b/net-misc/iputils/iputils-20070202.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20070202.ebuild,v 1.12 2008/04/20 20:05:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20070202.ebuild,v 1.13 2008/06/10 10:47:44 chainsaw Exp $
inherit flag-o-matic eutils toolchain-funcs
diff --git a/net-misc/iputils/iputils-20071127-r2.ebuild b/net-misc/iputils/iputils-20071127-r2.ebuild
new file mode 100644
index 000000000000..f3e2bb3f7296
--- /dev/null
+++ b/net-misc/iputils/iputils-20071127-r2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20071127-r2.ebuild,v 1.1 2008/06/10 10:47:44 chainsaw Exp $
+
+inherit flag-o-matic eutils toolchain-funcs
+
+DESCRIPTION="Network monitoring tools including ping and ping6"
+HOMEPAGE="http://www.linux-foundation.org/en/Net:Iputils"
+SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2
+ mirror://gentoo/iputils-s${PV}-manpages.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="doc idn ipv6 SECURITY_HAZARD static"
+
+DEPEND="virtual/os-headers
+ doc? (
+ app-text/openjade
+ dev-perl/SGMLSpm
+ app-text/docbook-sgml-dtd
+ app-text/docbook-sgml-utils
+ )"
+RDEPEND="!net-misc/rarpd
+ idn? ( net-dns/libidn )"
+
+S=${WORKDIR}/${PN}-s${PV}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gcc34.patch
+ epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch
+ epatch "${FILESDIR}"/${PN}-20070202-makefile.patch
+ epatch "${FILESDIR}"/${P}-kernel-ifaddr.patch
+ epatch "${FILESDIR}"/${PN}-20060512-linux-headers.patch
+ epatch "${FILESDIR}"/${PN}-20070202-no-open-max.patch #195861
+ epatch "${FILESDIR}"/${PN}-20070202-idn.patch #218638
+ use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch
+ use static && append-ldflags -static
+ use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile
+ export IDN=$(use idn && echo yes)
+}
+
+src_compile() {
+ tc-export CC
+ emake || die "make main failed"
+
+ # We include the extra check for docbook2html
+ # because when we emerge from a stage1/stage2,
+ # it may not exist #23156
+ if use doc && type -P docbook2html >/dev/null ; then
+ emake -j1 html || die
+ fi
+}
+
+src_install() {
+ into /
+ dobin ping || die "ping"
+ use ipv6 && dobin ping6
+ dosbin arping || die "arping"
+ into /usr
+ dosbin tracepath || die "tracepath"
+ use ipv6 && dosbin trace{path,route}6
+ dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin"
+
+ fperms 4711 /bin/ping
+ use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6
+
+ dodoc INSTALL RELNOTES
+ use ipv6 \
+ && dosym ping.8 /usr/share/man/man8/ping6.8 \
+ || rm -f doc/*6.8
+ rm -f doc/setkey.8
+ doman doc/*.8
+
+ use doc && dohtml doc/*.html
+}