summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Mende <angelos@gentoo.org>2008-04-27 14:54:53 +0000
committerChristoph Mende <angelos@gentoo.org>2008-04-27 14:54:53 +0000
commit5a3e89d38b62967963df39f5fa40a17f18a2cc11 (patch)
tree9b355c5edc5ce6e7b8dca93bee1bd84c87fcaab8 /net-misc
parentPurge older versions, fixes part of bug #218105 (because ffmpeg is not suppor... (diff)
downloadgentoo-2-5a3e89d38b62967963df39f5fa40a17f18a2cc11.tar.gz
gentoo-2-5a3e89d38b62967963df39f5fa40a17f18a2cc11.tar.bz2
gentoo-2-5a3e89d38b62967963df39f5fa40a17f18a2cc11.zip
Added a patch for masquerading on Linux 2.6.21
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/oidentd/ChangeLog10
-rw-r--r--net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch43
-rw-r--r--net-misc/oidentd/oidentd-2.0.8-r2.ebuild50
3 files changed, 101 insertions, 2 deletions
diff --git a/net-misc/oidentd/ChangeLog b/net-misc/oidentd/ChangeLog
index b4cc48228ec5..500fe629ea9a 100644
--- a/net-misc/oidentd/ChangeLog
+++ b/net-misc/oidentd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/oidentd
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/oidentd/ChangeLog,v 1.38 2007/10/24 11:38:13 uberlord Exp $
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/oidentd/ChangeLog,v 1.39 2008/04/27 14:54:52 angelos Exp $
+
+*oidentd-2.0.8-r2 (27 Apr 2008)
+
+ 27 Apr 2008; Christoph Mende <angelos@gentoo.org>
+ +files/oidentd-2.0.8-masquerading.patch, +oidentd-2.0.8-r2.ebuild:
+ Added a patch for masquerading on Linux 2.6.21
24 Oct 2007; Roy Marples <uberlord@gentoo.org> files/oidentd-2.0.7-init:
Check sysctl security.bsd.see_other_uids is not zero and error accordingly
diff --git a/net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch b/net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch
new file mode 100644
index 000000000000..191e9b95e64d
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-2.0.8-masquerading.patch
@@ -0,0 +1,43 @@
+--- oidentd.orig/src/kernel/linux.c 2006-05-22 06:58:53.000000000 +0300
++++ oidentd-2.0.8/src/kernel/linux.c 2007-07-11 21:28:56.000000000 +0300
+@@ -48,6 +48,7 @@
+ #define CFILE6 "/proc/net/tcp6"
+ #define MASQFILE "/proc/net/ip_masquerade"
+ #define CONNTRACK "/proc/net/ip_conntrack"
++#define NFCONNTRACK "/proc/net/nf_conntrack"
+
+ static int netlink_sock;
+ extern struct sockaddr_storage proxy;
+@@ -82,7 +83,15 @@
+ debug("fopen: %s: %s", CONNTRACK, strerror(errno));
+ return false;
+ }
+- masq_fp = fopen("/dev/null", "r");
++
++ masq_fp = fopen(NFCONNTRACK, "r");
++ if (masq_fp == NULL) {
++ if (errno != ENOENT) {
++ debug("fopen: %s: %s", NFCONNTRACK, strerror(errno));
++ return false;
++ }
++ masq_fp = fopen("/dev/null", "r");
++ }
+ }
+
+ netfilter = true;
+@@ -367,6 +376,15 @@
+ &nport_temp, &mport_temp);
+ }
+
++ if (ret != 21) {
++ ret = sscanf(buf,
++ "%*15s %*d %15s %*d %*d ESTABLISHED src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d packets=%*d bytes=%*d src=%d.%d.%d.%d dst=%d.%d.%d.%d sport=%d dport=%d",
++ proto, &l1, &l2, &l3, &l4, &r1, &r2, &r3, &r4,
++ &masq_lport_temp, &masq_fport_temp,
++ &nl1, &nl2, &nl3, &nl4, &nr1, &nr2, &nr3, &nr4,
++ &nport_temp, &mport_temp);
++ }
++
+ if (ret != 21)
+ continue;
+
diff --git a/net-misc/oidentd/oidentd-2.0.8-r2.ebuild b/net-misc/oidentd/oidentd-2.0.8-r2.ebuild
new file mode 100644
index 000000000000..ce7af57089f9
--- /dev/null
+++ b/net-misc/oidentd/oidentd-2.0.8-r2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/oidentd/oidentd-2.0.8-r2.ebuild,v 1.1 2008/04/27 14:54:52 angelos Exp $
+
+inherit eutils
+
+DESCRIPTION="Another (RFC1413 compliant) ident daemon"
+HOMEPAGE="http://dev.ojnk.net"
+SRC_URI="mirror://sourceforge/ojnk/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="debug ipv6 masquerade"
+
+RDEPEND=""
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}/oidentd-2.0.8-masquerading.patch"
+}
+
+src_compile() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable ipv6) \
+ $(use_enable masquerade masq) \
+ $(use_enable masquerade nat) \
+ || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed!"
+
+ dodoc AUTHORS ChangeLog README TODO NEWS \
+ "${FILESDIR}"/${PN}_masq.conf "${FILESDIR}"/${PN}.conf
+
+ newinitd "${FILESDIR}"/oidentd-2.0.7-init ${PN}
+ newconfd "${FILESDIR}"/oidentd-2.0.7-confd ${PN}
+}
+
+pkg_postinst() {
+ echo
+ elog "Example configuration files are in /usr/share/doc/${PF}"
+ echo
+}