Subject: [alpine-devel] new aport oidentd

From: "Carlo Landmeter" <[email-masked]>
Date: Wed, 28 Jan 2009 08:24:20 +0000

I put it in testing. If its good enough for extra go ahead.

carlo

From 11f1faed84b43d55c121725c858ed404683a5d8e Mon Sep 17 00:00:00 2001
From: Carlo Landmeter <[email-masked]>
Date: Wed, 28 Jan 2009 08:22:52 +0000
Subject: [PATCH] testing/oidentd: new aport

---
 testing/oidentd/APKBUILD      |   34 +++++++++++++++++++++++++++++++++
 testing/oidentd/oidentd.conf  |   22 +++++++++++++++++++++
 testing/oidentd/oidentd.confd |    4 +++
 testing/oidentd/oidentd.initd |   42 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 0 deletions(-)
 create mode 100644 testing/oidentd/APKBUILD
 create mode 100644 testing/oidentd/oidentd.conf
 create mode 100644 testing/oidentd/oidentd.confd
 create mode 100644 testing/oidentd/oidentd.initd

diff --git a/testing/oidentd/APKBUILD b/testing/oidentd/APKBUILD
new file mode 100644
index 0000000..130283f
--- /dev/null
+++ b/testing/oidentd/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Carlo Landmeter <[email-masked]>
+pkgname=oidentd
+pkgver=2.0.8
+pkgrel=0
+pkgdesc="Configurable IDENT server that supports NAT/IP masq."
+url="http://dev.ojnk.net/"
+license="GPL"
+depends="uclibc"
+makedepends=""
+subpackages="$pkgname-doc"
+source="http://downloads.sourceforge.net/ojnk/$pkgname-$pkgver.tar.gz
+oidentd.conf
+oidentd.initd
+oidentd.confd"
+
+build() {
+	cd "$srcdir/$pkgname-$pkgver"
+
+	./configure --prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info
+	make || return 1
+	make DESTDIR="$pkgdir" install
+	install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+	install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+	install -D -m644 "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf
+
+}
+
+md5sums="c3d9a56255819ef8904b867284386911  oidentd-2.0.8.tar.gz
+d9c40e4d6a0bde685a359ad49b4eada2  oidentd.conf
+89a027c3b8245f6c5e79930d16d485f7  oidentd.initd
+05a43d3987754f179f4e31bbe61ff315  oidentd.confd"
diff --git a/testing/oidentd/oidentd.conf b/testing/oidentd/oidentd.conf
new file mode 100644
index 0000000..03b28d8
--- /dev/null
+++ b/testing/oidentd/oidentd.conf
@@ -0,0 +1,22 @@
+# Configuration for oidentd
+# see oidentd.conf(5)
+# 
+default {
+	default {
+		deny spoof
+		deny spoof_all
+		deny spoof_privport
+		allow random
+		allow random_numeric
+		allow numeric
+		deny hide
+	}
+}
+
+# you may want to hide root connections
+#user "root" {
+#	default {
+#		force reply "UNKNOWN"
+#	}
+#}
+
diff --git a/testing/oidentd/oidentd.confd b/testing/oidentd/oidentd.confd
new file mode 100644
index 0000000..3116889
--- /dev/null
+++ b/testing/oidentd/oidentd.confd
@@ -0,0 +1,4 @@
+# oidentd start-up options
+USER="nobody"
+GROUP="nobody"
+OPTIONS=""
diff --git a/testing/oidentd/oidentd.initd b/testing/oidentd/oidentd.initd
new file mode 100644
index 0000000..c40b058
--- /dev/null
+++ b/testing/oidentd/oidentd.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-misc/oidentd/files/oidentd-2.0.7-init,v 1.4 2007/10/24 11:38:14 uberlord Exp $
+
+depend() {
+    need net
+}
+
+check_config() {
+	if [ -z "${USER}" ]
+	then
+		eerror "Please set \$USER in /etc/conf.d/oidentd!"
+		return 1
+	fi
+	if [ -z "${GROUP}" ]
+	then
+		eerror "Please set \$GROUP in /etc/conf.d/oidentd!"
+		return 1
+	fi
+
+	if [ "$(sysctl -n security.bsd.see_other_uids 2>/dev/null)" = "0" ]; then
+		eerror "${SVCNAME} cannot work if the sysctl security.bsd.see_other_uids is 0"
+		return 1
+	fi
+}
+
+
+start() {
+	check_config || return 1
+	ebegin "Starting oidentd"
+	OPTIONS="${OPTIONS} -u ${USER} -g ${GROUP}"
+	start-stop-daemon --start --quiet --exec /usr/sbin/oidentd -- $OPTIONS
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping oidentd"
+	start-stop-daemon --stop --quiet --exec /usr/sbin/oidentd
+	eend $?
+}
+
-- 
1.6.1

---

From: Natanael Copa <[email-masked]>
Date: Wed, 28 Jan 2009 10:33:48 +0100

> I put it in testing. If its good enough for extra go ahead.

Looks good. I moved it to extra.

Thanks!

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---