ports/79868: [maintainer update] openradius - install docs, fix perms, add rcng

Adam Jette jettea46 at yahoo.com
Wed Apr 13 15:50:25 UTC 2005


>Number:         79868
>Category:       ports
>Synopsis:       [maintainer update] openradius - install docs, fix perms, add rcng
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 13 15:50:23 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Adam Jette
>Release:        FreeBSD 5.3-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD twist 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #0: Tue Mar 8 20:26:34 EST 2005 jettea at twist:/usr/src/sys/GEN i386


	
>Description:
	Documentation for the program is provided as html files and sample files which were not being installed. Some of the config files contain potentially sensitive information and were world readable. A RC script is always helpful. A line in the comment of the openradius makefile was being interpreted as a non-comment.
>How-To-Repeat:
	
>Fix:

	

--- openradius.diff begins here ---
diff -ruN openradius.bak/Makefile openradius/Makefile
--- openradius.bak/Makefile	Tue Apr 12 09:39:47 2005
+++ openradius/Makefile	Wed Apr 13 11:30:11 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	openradius
 PORTVERSION=	0.9.10
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	http://www.xs4all.nl/~evbergen/openradius/download/ \
 		http://www.mirrors.wiretapped.net/security/authentication/radius/openradius/
@@ -14,6 +15,8 @@
 MAINTAINER=	jettea46 at yahoo.com
 COMMENT=	A RADIUS server with some actual documentation
 
+LOGFILE?=	/var/log/openradius.log
+
 CONFLICTS=	freeradius-0.* gnu-radius-1.* radiusd-cistron-1.*
 
 CC?=		gcc
@@ -32,7 +35,39 @@
 PLIST_SUB+=	LDAP="@comment "
 .endif
 
+post-patch:
+	@${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%LOGFILE%%|${LOGFILE}|g" \
+		< ${FILESDIR}/openradiusd.sh > ${WRKDIR}/openradiusd.sh
+
 post-install:
+.if !defined(NOPORTDOCS)
+	${MKDIR} ${DOCSDIR}
+	${MKDIR} ${EXAMPLESDIR}
+	${MKDIR} ${EXAMPLESDIR}/accounts
+	${INSTALL_MAN} ${WRKSRC}/doc/async-iface-notes ${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/doc/language.html ${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/doc/module-interface.html ${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/doc/note-struct-ownership ${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/doc/using-openradius.html ${DOCSDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-ldap ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-ldap-authbind ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-mysql ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-postgres ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-unixpass ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-usersfile ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/behaviour.sample-usersfile-longpass ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/configuration.sample-ldap ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/configuration.sample-ldap-authbind ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/configuration.sample-mysql ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/configuration.sample-postgres ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/configuration.sample-unixpass ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/configuration.sample-usersfile ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/redhat-sysv-init-script ${EXAMPLESDIR}
+	${INSTALL_MAN} ${WRKSRC}/examples/accounts/README ${EXAMPLESDIR}/accounts
+	${INSTALL_MAN} ${WRKSRC}/examples/accounts/accounts.mysql ${EXAMPLESDIR}/accounts
+	${INSTALL_MAN} ${WRKSRC}/examples/accounts/behaviour ${EXAMPLESDIR}/accounts
+	${INSTALL_MAN} ${WRKSRC}/examples/accounts/configuration ${EXAMPLESDIR}/accounts
+.endif
 # Configuration, copy over to sample files
 	${MKDIR} ${PREFIX}/etc/${PORTNAME}
 .for FILE in dictionary behaviour configuration
@@ -42,9 +77,10 @@
 # Copy over legacy config files to sample
 	${MKDIR} ${PREFIX}/etc/${PORTNAME}/legacy
 .for FILE in clients nases realms users
-	${INSTALL_DATA} ${WRKSRC}/etc/legacy/${FILE} \
+	${INSTALL} -m 0600 ${WRKSRC}/etc/legacy/${FILE} \
 		${PREFIX}/etc/${PORTNAME}/legacy/${FILE}.sample
 .endfor
+	@${INSTALL_SCRIPT} ${WRKDIR}/openradiusd.sh ${PREFIX}/etc/rc.d
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
diff -ruN openradius.bak/files/openradiusd.sh openradius/files/openradiusd.sh
--- openradius.bak/files/openradiusd.sh	Wed Dec 31 19:00:00 1969
+++ openradius/files/openradiusd.sh	Tue Apr 12 11:37:59 2005
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: radiusd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the following line to /etc/rc.conf to enable radiusd:
+#
+# radiusd_enable="YES"
+#
+
+radiusd_enable=${radiusd_enable-"NO"}
+radiusd_flags=${radiusd_flags-"-o %%LOGFILE%%"}
+
+. /etc/rc.subr
+
+name=radiusd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/${name}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff -ruN openradius.bak/pkg-message openradius/pkg-message
--- openradius.bak/pkg-message	Tue Apr 12 09:39:47 2005
+++ openradius/pkg-message	Tue Apr 12 10:19:27 2005
@@ -1,2 +1,4 @@
+
 Configuration sample files were installed, you will need to copy
 these over to create real configuration files.
+
diff -ruN openradius.bak/pkg-plist openradius/pkg-plist
--- openradius.bak/pkg-plist	Tue Apr 12 09:39:47 2005
+++ openradius/pkg-plist	Tue Apr 12 10:46:16 2005
@@ -47,3 +47,34 @@
 bin/radtest
 
 sbin/radiusd
+etc/rc.d/openradiusd.sh
+
+%%PORTDOCS%%%%DOCSDIR%%/async-iface-notes
+%%PORTDOCS%%%%DOCSDIR%%/language.html
+%%PORTDOCS%%%%DOCSDIR%%/module-interface.html
+%%PORTDOCS%%%%DOCSDIR%%/note-struct-ownership
+%%PORTDOCS%%%%DOCSDIR%%/using-openradius.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+
+%%PORTDOCS%%%%EXAMPLESDIR%%/accounts/README
+%%PORTDOCS%%%%EXAMPLESDIR%%/accounts/accounts.mysql
+%%PORTDOCS%%%%EXAMPLESDIR%%/accounts/behaviour
+%%PORTDOCS%%%%EXAMPLESDIR%%/accounts/configuration
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/accounts
+
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-ldap
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-ldap-authbind
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-mysql
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-postgres
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-unixpass
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-usersfile
+%%PORTDOCS%%%%EXAMPLESDIR%%/behaviour.sample-usersfile-longpass
+%%PORTDOCS%%%%EXAMPLESDIR%%/configuration.sample-ldap
+%%PORTDOCS%%%%EXAMPLESDIR%%/configuration.sample-ldap-authbind
+%%PORTDOCS%%%%EXAMPLESDIR%%/configuration.sample-mysql
+%%PORTDOCS%%%%EXAMPLESDIR%%/configuration.sample-postgres
+%%PORTDOCS%%%%EXAMPLESDIR%%/configuration.sample-unixpass
+%%PORTDOCS%%%%EXAMPLESDIR%%/configuration.sample-usersfile
+%%PORTDOCS%%%%EXAMPLESDIR%%/redhat-sysv-init-script
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+
diff -ruN openradius.bak/scripts/configure openradius/scripts/configure
--- openradius.bak/scripts/configure	Tue Apr 12 09:39:46 2005
+++ openradius/scripts/configure	Tue Apr 12 11:28:13 2005
@@ -10,7 +10,19 @@
 DIR_SBIN	= $PREFIX/sbin
 DIR_ETC 	= $PREFIX/etc/openradius
 DIR_LIB 	= $PREFIX/lib/openradius
-FILE_LOG	= $PREFIX/var/log/openradius.log
+END
+
+if [ x$LOGFILE != x ]; then
+cat >> Makefile << END
+FILE_LOG	= $LOGFILE
+END
+else
+cat >> Makefile << END
+FILE_LOG	= /var/log/openradius.log
+END
+fi
+
+cat >> Makefile << END
 
 ### Modules that will be built and installed
 #
@@ -51,7 +63,6 @@
 
 ### Build tools
 # 
-# The C compiler named here must output full (header) dependencies in $(@).d.
 # It may be necessary to create a script similar to ccd-gcc for your compiler.
 # 
 CMPLR		= ./build/ccd-gcc
--- openradius.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list