ports/71378: oidentd port update

Jeremy Chadwick freebsd at jdc.parodius.com
Sat Sep 4 16:40:22 UTC 2004


>Number:         71378
>Category:       ports
>Synopsis:       oidentd port update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 04 16:40:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Chadwick
>Release:        FreeBSD 4.10-PRERELEASE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #0: Wed May 5 03:33:17 PDT 2004 root at pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
	* Remove USE_GMAKE (builds okay here with BSD make)
	* Clean up portions of main Makefile (don't need post/pre)
	* Add %%PREFIX%% man page patches
	* Add patch for ipv6_missing.h; removes EAI_MEMORY
	  re-definition warnings, and is more FreeBSD-focused
	* Support 'oidentd_conf' rc.subr variable for those who want to
	  be able to specify a configuration file.  Also update the
	  'required_files' code to work with this too...

	Patch tested on 5.3-BETA2.  The only part I'm concerned about is
	the removal of USE_GMAKE.  I'd *REALLY* like to get rid of this
	reliance, so if it doesn't work, let me know and I'll start
	sending Makefile.in patches.  ;-)
>How-To-Repeat:
	n/a
>Fix:
	Apply below patch.


diff -ruN oidentd.orig/Makefile oidentd/Makefile
--- oidentd.orig/Makefile	Wed May 19 19:43:30 2004
+++ oidentd/Makefile	Sat Sep  4 16:27:12 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	oidentd
 PORTVERSION=	2.0.7
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	security
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	ojnk
@@ -15,7 +15,7 @@
 MAINTAINER=	oliver at FreeBSD.org
 COMMENT=	Ident server that supports user-defined ident strings
 
-USE_GMAKE=	yes
+USE_RC_SUBR=	yes
 USE_REINPLACE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@@ -25,10 +25,6 @@
 PLIST_FILES=	sbin/oidentd etc/rc.d/oidentd.sh etc/oidentd.conf.sample \
 		etc/oidentd_masq.conf.sample
 
-.include <bsd.port.pre.mk>
-
-USE_RC_SUBR=	yes
-
 post-patch:
 	@${REINPLACE_CMD} -e 's,/etc/,${PREFIX}&,g' ${WRKSRC}/src/oidentd.h
 
@@ -41,7 +37,12 @@
 	${INSTALL_PROGRAM} ${WRKSRC}/src/oidentd ${PREFIX}/sbin
 	${INSTALL_DATA} ${MAN5:S,^,${FILESDIR}/,:S,5$,sample,} ${PREFIX}/etc
 	${INSTALL_SCRIPT} ${WRKDIR}/oidentd.sh ${PREFIX}/etc/rc.d
+.if !defined(NO_INSTALL_MANPAGES)
+.for MANFILE in ${MAN5} ${MAN8}
+	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/doc/${MANFILE}
+.endfor
 	${INSTALL_MAN} ${MAN5:S,^,${WRKSRC}/doc/,} ${PREFIX}/man/man5
 	${INSTALL_MAN} ${MAN8:S,^,${WRKSRC}/doc/,} ${PREFIX}/man/man8
+.endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN oidentd.orig/files/oidentd.sh oidentd/files/oidentd.sh
--- oidentd.orig/files/oidentd.sh	Sat Jan 31 13:32:34 2004
+++ oidentd/files/oidentd.sh	Sat Sep  4 15:45:49 2004
@@ -21,12 +21,23 @@
 rcvar=`set_rcvar`
 
 command=%%PREFIX%%/sbin/${name}
-required_files=%%PREFIX%%/etc/${name}.conf
 
 # set defaults
 
 oidentd_enable=${oidentd_enable:-"NO"}
+oidentd_conf=${oidentd_conf:-"%%PREFIX%%/etc/${name}.conf"}
 oidentd_flags=${oidentd_flags:-""}
 
+oidentd_precmd ()
+{
+	if [ -n "${oidentd_conf}" ]; then
+		rc_flags="${rc_flags} -C ${oidentd_conf}"
+	fi
+}
+
 load_rc_config ${name}
+
+start_precmd=${name}_precmd
+required_files=${oidentd_conf}
+
 run_rc_command "$1"
diff -ruN oidentd.orig/files/patch-ipv6_missing.h oidentd/files/patch-ipv6_missing.h
--- oidentd.orig/files/patch-ipv6_missing.h	Thu Jan  1 00:00:00 1970
+++ oidentd/files/patch-ipv6_missing.h	Sat Sep  4 16:05:43 2004
@@ -0,0 +1,42 @@
+--- src/missing/ipv6_missing.h.orig	Tue Dec  3 06:05:18 2002
++++ src/missing/ipv6_missing.h	Sat Sep  4 16:05:28 2004
+@@ -1,20 +1,32 @@
+ #ifndef __IPV6_MISSING_H
+ #define __IPV6_MISSING_H
+ 
++/* Correspond some of these values with present-day FreeBSD;
++ * verified on 4.10-STABLE and 5.3-BETA2.
++ */
++
++#ifndef EAI_MEMORY
++#	define EAI_MEMORY	6
++#endif
+ #ifndef EAI_NODATA
+-#	define EAI_NODATA	1
+-#	define EAI_MEMORY	2
++#	define EAI_NODATA	7
+ #endif
+ 
+ #ifndef AI_PASSIVE
+-#	define AI_PASSIVE		1
+-#	define AI_CANONNAME		2
++#	define AI_PASSIVE	0x00000001
++#endif
++#ifndef AI_CANONNAME
++#	define AI_CANONNAME	0x00000002
+ #endif
+ 
+ #ifndef NI_NUMERICHOST
+-#	define NI_NUMERICHOST	2
+-#	define NI_NAMEREQD		4
+-#	define NI_NUMERICSERV	8
++#	define NI_NUMERICHOST	0x00000002
++#endif
++#ifndef NI_NAMEREQD
++#	define NI_NAMEREQD	0x00000004
++#endif
++#ifndef NI_NUMERICSERV
++#	define NI_NUMERICSERV	0x00000008
+ #endif
+ 
+ #ifndef HAVE_STRUCT_ADDRINFO
diff -ruN oidentd.orig/files/patch-oidentd.8 oidentd/files/patch-oidentd.8
--- oidentd.orig/files/patch-oidentd.8	Thu Jan  1 00:00:00 1970
+++ oidentd/files/patch-oidentd.8	Sat Sep  4 16:13:40 2004
@@ -0,0 +1,34 @@
+--- doc/oidentd.8.orig	Sun Apr 27 20:40:59 2003
++++ doc/oidentd.8	Sat Sep  4 16:12:29 2004
+@@ -58,7 +58,7 @@
+ 
+ .TP
+ .B "\-C or \-\-config=<config file>"
+-Use the specified file as the configuration file. The default location of the configuration file is \fB/etc/oidentd.conf\fP.
++Use the specified file as the configuration file. The default location of the configuration file is \fB%%PREFIX%%/etc/oidentd.conf\fP.
+ 
+ .TP
+ .B "\-d or \-\-debug"
+@@ -70,7 +70,7 @@
+ 
+ .TP
+ .B "\-f or \-\-forward=[<port>]"
+-When IP masquerading support is enabled, forward requests for machines that masquerade through us to those machines on the specified port. If a port is not given, oidentd will use the default port for the ident service ("auth" or port 113). If the forwarded request fails, \fBoidentd\fP will fall back to reading the \fB/etc/oidentd_masq.conf\fP file. In order for forwarding to work, the machine to which the connection is forwarded must also be running oidentd, and oidentd must be run with the -P switch specifying the host that is forwarding the connections. If the ident daemon on the host to which the connection is forwarded is capable of returning a fixed string for any lookup (for example, the ident server built in to the mIRC windows IRC client), it is not necessary to run oidentd on that host.
++When IP masquerading support is enabled, forward requests for machines that masquerade through us to those machines on the specified port. If a port is not given, oidentd will use the default port for the ident service ("auth" or port 113). If the forwarded request fails, \fBoidentd\fP will fall back to reading the \fB%%PREFIX%%/etc/oidentd_masq.conf\fP file. In order for forwarding to work, the machine to which the connection is forwarded must also be running oidentd, and oidentd must be run with the -P switch specifying the host that is forwarding the connections. If the ident daemon on the host to which the connection is forwarded is capable of returning a fixed string for any lookup (for example, the ident server built in to the mIRC windows IRC client), it is not necessary to run oidentd on that host.
+ 
+ .TP
+ .B "\-g or \-\-group=<group|GID>"
+@@ -152,11 +152,11 @@
+ 
+ .SH FILES
+ .TP
+-.B /etc/oidentd.conf
++.B %%PREFIX%%/etc/oidentd.conf
+ The system-wide configuration file.
+ 
+ .TP
+-.B /etc/oidentd_masq.conf
++.B %%PREFIX%%/etc/oidentd_masq.conf
+ The NAT/IP masquerading mappings.
+ 
+ .TP
diff -ruN oidentd.orig/files/patch-oidentd.conf.5 oidentd/files/patch-oidentd.conf.5
--- oidentd.orig/files/patch-oidentd.conf.5	Thu Jan  1 00:00:00 1970
+++ oidentd/files/patch-oidentd.conf.5	Sat Sep  4 16:22:14 2004
@@ -0,0 +1,38 @@
+--- doc/oidentd.conf.5.orig	Sun Apr 27 20:40:59 2003
++++ doc/oidentd.conf.5	Sat Sep  4 16:12:48 2004
+@@ -16,7 +16,7 @@
+ The \fBoidentd\fP configuration file is used to specify the amount of control users have over the responses \fBoidentd\fP returns upon successful lookups for connections owned by them.
+ .PP
+ The \fB$HOME/.oidentd.conf\fP file allows a user to specify what ident response will be returned for specific connections.
+-.SH /etc/oidentd.conf SYNTAX
++.SH %%PREFIX%%/etc/oidentd.conf SYNTAX
+ .TP
+ .B USER DIRECTIVE
+ The \fBoidentd.conf\fP file consists of 0 or more \fIuser\fP directives. The \fIuser\fP directive is used to grant capabilities on a per-user basis.
+@@ -101,7 +101,7 @@
+ 
+ The \fIglobal\fP directive acts as a wildcard, matching all connections, so if used at all, the global directive should be the first entry in the file and should be used only once. Use is permitted anywhere in the file and infinitely many times, however it doesn't make much sense to use it in this manner.
+ 
+-The range directive has the same syntax and semantics as the range directive in the \fB/etc/oidentd.conf\fP file. See above for a description.
++The range directive has the same syntax and semantics as the range directive in the \fB%%PREFIX%%/etc/oidentd.conf\fP file. See above for a description.
+ 
+ Valid capabilities are \fIreply\fP, \fIrandom\fP, \fInumeric\fP, \fIrandom_numeric\fP, and \fIhide\fP. Descriptions can be found below.
+ .SH CAPABILITIES
+@@ -126,7 +126,7 @@
+ 
+ In a user's \fB$HOME/.oidentd.conf\fP file, up to 20 strings may be specified for a \fBreply\fP statement.
+ 
+-In the \fB/etc/oidentd.conf\fP file, there is no limitation on the number of strings that may be specified.
++In the \fB%%PREFIX%%/etc/oidentd.conf\fP file, there is no limitation on the number of strings that may be specified.
+ 
+ The strings must be quoted strings (e.g. "string"). Strings may contain the following escape characters:
+ 
+@@ -183,7 +183,7 @@
+ .TP
+ .B random_numeric
+ Reply to successful with a randomly generated ident response of the form userN, where N is a random number between 0 and 100000.
+-.SH EXAMPLE /etc/oidentd.conf FILE
++.SH EXAMPLE %%PREFIX%%/etc/oidentd.conf FILE
+ .nf
+ default {
+ 	default {
diff -ruN oidentd.orig/files/patch-oidentd_masq.conf.5 oidentd/files/patch-oidentd_masq.conf.5
--- oidentd.orig/files/patch-oidentd_masq.conf.5	Thu Jan  1 00:00:00 1970
+++ oidentd/files/patch-oidentd_masq.conf.5	Sat Sep  4 16:14:18 2004
@@ -0,0 +1,11 @@
+--- doc/oidentd_masq.conf.5.orig	Sun Apr 27 20:40:59 2003
++++ doc/oidentd_masq.conf.5	Sat Sep  4 16:12:11 2004
+@@ -13,7 +13,7 @@
+ oidentd_masq.conf - oidentd IP masquerading/NAT configuration file.
+ 
+ .SH DESCRIPTION
+-If you are using IP masquerading or NAT, oidentd can optionally return a username for connections from other machines.  Support for this is specified by calling \fBoidentd\fP with the \-m (or \-\-masq) flag and by creating an \fB/etc/oidentd_masq.conf\fP file.
++If you are using IP masquerading or NAT, oidentd can optionally return a username for connections from other machines.  Support for this is specified by calling \fBoidentd\fP with the \-m (or \-\-masq) flag and by creating an \fB%%PREFIX%%/etc/oidentd_masq.conf\fP file.
+ .PP
+ \fBoidentd\fP can also forward requests for an IP masqueraded connection to the machine from which connection originates by way of the -f option.  This will only work if the host to which the connection is forwarded is running oidentd with the -P (proxy) flag, or if the host's ident daemon will return a valid reply regardless of the input supplied by and the address of the host requesting the info (some ident daemons for windows do this, maybe others).
+ 
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list