From owner-freebsd-ports Fri Oct 4 14:11:20 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2550E37B40A for ; Fri, 4 Oct 2002 14:10:10 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3630943E91 for ; Fri, 4 Oct 2002 14:10:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g94LA4Co055188 for ; Fri, 4 Oct 2002 14:10:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g94LA4Lr055187; Fri, 4 Oct 2002 14:10:04 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB3C437B401 for ; Fri, 4 Oct 2002 14:03:34 -0700 (PDT) Received: from mail.westbend.net (ns1.westbend.net [216.47.253.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 897E643E3B for ; Fri, 4 Oct 2002 14:03:33 -0700 (PDT) (envelope-from hetzels@WBIw009.westbend.net) Received: from WBIw009.westbend.net (wbiw009 [216.47.253.29]) by mail.westbend.net (8.12.5/8.12.5) with ESMTP id g94L3WrH057828 for ; Fri, 4 Oct 2002 16:03:32 -0500 (CDT) (envelope-from hetzels@WBIw009.westbend.net) Received: from WBIw009.westbend.net (localhost [127.0.0.1]) by WBIw009.westbend.net (8.12.6/8.12.6) with ESMTP id g94L3VJ0030797 for ; Fri, 4 Oct 2002 16:03:31 -0500 (CDT) (envelope-from hetzels@WBIw009.westbend.net) Received: (from root@localhost) by WBIw009.westbend.net (8.12.6/8.12.6/Submit) id g94L3VjR030796; Fri, 4 Oct 2002 16:03:31 -0500 (CDT) Message-Id: <200210042103.g94L3VjR030796@WBIw009.westbend.net> Date: Fri, 4 Oct 2002 16:03:31 -0500 (CDT) From: "Scot W. Hetzel" Reply-To: "Scot W. Hetzel" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/43672: RC_NG script for security/cyrus_sasl + Update to 1.5.28 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 43672 >Category: ports >Synopsis: RC_NG script for security/cyrus_sasl + Update to 1.5.28 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Oct 04 14:10:04 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: FreeBSD 5.0-CURRENT i386 >Organization: West Bend Internet >Environment: System: FreeBSD Current.westbend.net 5.0-CURRENT FreeBSD 5.0-CURRENT #5: Tue Sep 24 11:27:41 CDT 2002 root@Current.westbend.net:/usr/obj/usr/src/srcC/sys/GENERIC-SMP i386 >Description: While looking at the RC_NG scripts on 5.0-CURRENT, I looked at converting the ports rc startup scripts to RC_NG. I decided to start with cyrus-imapd and the ports that it depends on (cyrus-sasl, openldap, openldap2, mysql323-client). To ensure compatibility with previous FreeBSD Releases, the rc scripts contain both the new RC_NG and pre RC_NG scripts. >How-To-Repeat: >Fix: Changed Files: Makefile - Update to 1.5.28, install pwcheck.sh as cyrus_pwcheck.sh, as pwcheck exists in RC_NG (/etc/rc.d/pwcheck). cyrus_pwcheck.sh may be moved into /etc/rc.d/ by system administrator to allow the script to start with the base rc scripts. distinfo pkg-deinstall - Add delete_rc_conf_d to remove rc script configuration files ${prefix}/etc/rc.conf.d/{cyrus_pwcheck,saslauthd) pkg-install - Add create_rc_conf_d to create rc script configuration files ${prefix}/etc/rc.conf.d/{cyrus_pwcheck,saslauthd) pkg-plist - Rename pwcheck.sh to cyrus_pwcheck.sh files/patch-ab - Update to 1.5.28 files/patch-saslauthd::Makefile.am files/pwcheck.sh - Update to RC_NG script files/saslauthd.sh - Update to RC_NG script scripts/configure.sasl - Change PWCHECK_SUB and SASLAUTHD_SUB to RC_SCRIPTS_SUB (similar to PLIST_SUB) New Files: files/cyrus_sasl1 - Dummy RC_NG Dependency file used to ensure that any dependency script is started before the use of the sasl libraries. Only usefull if placed into /etc/rc.d with the script it depends on. (i.e. mysql-client needs to run before cyrus_sasl1) Removed Files: files/patch-plugins::gssapi.c Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/Makefile,v retrieving revision 1.47 diff -u -r1.47 Makefile --- Makefile 1 Sep 2002 16:38:33 -0000 1.47 +++ Makefile 3 Oct 2002 22:58:04 -0000 @@ -6,22 +6,24 @@ # PORTNAME= cyrus-sasl -PORTVERSION= 1.5.27 -PORTREVISION= 7 +PORTVERSION= 1.5.28 +PORTREVISION= 0 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%SUBDIR%/ \ - http://www.surf.org.uk/downloads/ \ ftp://ftp.westbend.net/pub/cyrus-mail/%SUBDIR%/ \ - ${MASTER_SITE_SOURCEFORGE} \ - ftp://ftp.hanse.de/sites/transit/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/ -MASTER_SITE_SUBDIR= . OLD-VERSIONS/sasl cyrus-utils + ftp://ftp.hanse.de/sites/transit/mirror/ftp.andrew.cmu.edu/pub/cyrus-mail/ \ + http://www.surf.org.uk/downloads/:ldap_mysql \ + ftp://ftp.westbend.net/pub/cyrus-mail/%SUBDIR%/:ldap_mysql \ + ${MASTER_SITE_SOURCEFORGE:S/$/:ldap_mysql/} \ + +MASTER_SITE_SUBDIR= . OLD-VERSIONS/sasl cyrus-utils:ldap_mysql DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ - sasl-${PORTVERSION}-ldap-ssl-filter-mysql-patch4.tgz + sasl-${PORTVERSION}-ldap-ssl-filter-mysql-patch.tgz:ldap_mysql -PATCH_SITES= ftp://ftp.westbend.net/pub/cyrus-mail/contrib/ \ +PATCH_SITES= ftp://ftp.westbend.net/pub/cyrus-mail/contrib/:apop \ http://www.imasy.or.jp/~ume/ipv6/ -PATCHFILES= sasl_apop_patch.gz \ +PATCHFILES= sasl_apop_patch.gz:apop \ ${DISTNAME}-ipv6-${IPV6_VER}.diff.gz MAINTAINER= hetzels@westbend.net @@ -130,10 +132,16 @@ # Fix pkg-{install/deinstall/messages} post-patch: @${SED} -e "s;%%SASLDB%%;${SASLDB_NAME};g" \ + -e "s;%%PWCHECK%%;${PWCHECK};g" \ + -e "s;%%ENABLE_PWCHECK%%;${ENABLE_PWCHECK};g" \ -e "s;%%PWCHECK_METHOD%%;${PWCHECK_METHOD};g" \ + -e "s;%%ENABLE_SASLAUTHD%%;${ENABLE_SASLAUTHD};g" \ ${.CURDIR}/pkg-install > ${PKGINSTALL} @${SED} -e "s;%%SASLDB%%;${SASLDB_NAME};g" \ + -e "s;%%PWCHECK%%;${PWCHECK};g" \ + -e "s;%%ENABLE_PWCHECK%%;${ENABLE_PWCHECK};g" \ -e "s;%%PWCHECK_METHOD%%;${PWCHECK_METHOD};g" \ + -e "s;%%ENABLE_SASLAUTHD%%;${ENABLE_SASLAUTHD};g" \ ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL} @${SED} -e "s;%%PWCHECK_METHOD%%;${PWCHECK_METHOD};g" \ -e "s;%%PREFIX%%;${PREFIX};g" \ @@ -161,16 +169,19 @@ fi post-install: - @${SED} -e "s;%%PREFIX%%;${PREFIX};g" ${PWCHECK_SUB} \ - ${FILESDIR}/pwcheck.sh > ${PREFIX}/etc/rc.d/pwcheck.sh @${MKDIR} ${EXAMPLESDIR} @${SED} -e 's;%%PREFIX%%;${PREFIX};g' \ ${FILESDIR}/cyrus.pam > ${EXAMPLESDIR}/cyrus.pam - @${CHMOD} 755 ${PREFIX}/etc/rc.d/pwcheck.sh - ${INSTALL} -d -m 770 -o cyrus -g cyrus /var/pwcheck - @${SED} -e "s;%%PREFIX%%;${PREFIX};g" ${SASLAUTHD_SUB} \ + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/pwcheck.sh > ${PREFIX}/etc/rc.d/cyrus_pwcheck.sh + @${CHMOD} 755 ${PREFIX}/etc/rc.d/cyrus_pwcheck.sh + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/saslauthd.sh > ${PREFIX}/etc/rc.d/saslauthd1.sh @${CHMOD} 755 ${PREFIX}/etc/rc.d/saslauthd1.sh + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/cyrus_sasl1 > ${PREFIX}/etc/rc.d/cyrus_sasl1 + @${CHMOD} 755 ${PREFIX}/etc/rc.d/cyrus_sasl1 + ${INSTALL} -d -m 770 -o cyrus -g cyrus /var/pwcheck ${INSTALL} -d -m 770 -o cyrus -g cyrus /var/state/saslauthd1 .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} Index: distinfo =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/distinfo,v retrieving revision 1.9 diff -u -r1.9 distinfo --- distinfo 26 Jun 2002 18:49:21 -0000 1.9 +++ distinfo 10 Sep 2002 05:33:26 -0000 @@ -1,4 +1,4 @@ -MD5 (cyrus-sasl-1.5.27.tar.gz) = 76ea426e2e2da3b8d2e3a43af5488f3b -MD5 (sasl-1.5.27-ldap-ssl-filter-mysql-patch4.tgz) = 3e2b5cf7c5f8f0e8551f28a8d83391bb +MD5 (cyrus-sasl-1.5.28.tar.gz) = 60710be040801e9aff7353563b636518 +MD5 (sasl-1.5.28-ldap-ssl-filter-mysql-patch.tgz) = 60771e73884b4562e7233028afe0d358 MD5 (sasl_apop_patch.gz) = 6bf7a34b73d1c8d139d2269069d1ba4c -MD5 (cyrus-sasl-1.5.27-ipv6-20020106.diff.gz) = b2956a084954a46ba2d751f56a80a275 +MD5 (cyrus-sasl-1.5.28-ipv6-20020106.diff.gz) = 5987181a53531a46b2aec88b9aea6f9a Index: pkg-deinstall =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-deinstall,v retrieving revision 1.6 diff -u -r1.6 pkg-deinstall --- pkg-deinstall 14 Aug 2002 18:39:45 -0000 1.6 +++ pkg-deinstall 4 Oct 2002 01:22:17 -0000 @@ -12,6 +12,32 @@ SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%% +remove_file() +{ + file=$1 + + if cmp -s ${file} ${file}.tmp; then + rm -f ${file} + fi + rm -f ${file}.tmp +} + +delete_rc_conf_d() { + PWCHECK_CONF=${PKG_PREFIX}/etc/rc.conf.d/cyrus_pwcheck + SASLAUTHD_CONF=${PKG_PREFIX}/etc/rc.conf.d/saslauthd1 + + if [ -f ${SASLAUTHD_CONF} ]; then + echo "saslauthd1_enable=%%ENABLE_SASLAUTHD%%" >> ${SASLAUTHD_CONF}.tmp + echo "saslauthd1_flags=\"-a pam\"" >> ${SASLAUTHD_CONF}.tmp + remove_file ${SASLAUTHD_CONF} + fi + if [ -f ${PWCHECK_CONF} ]; then + echo "cyrus_pwcheck_enable=%%ENABLE_PWCHECK%%" > ${PWCHECK_CONF}.tmp + echo "cyrus_pwcheck_program=${PKG_PREFIX}/sbin/%%PWCHECK%%" >> ${PWCHECK_CONF}.tmp + remove_file ${PWCHECK_CONF} + fi +} + # delete sasldb database delete_sasldb() { @@ -39,16 +65,14 @@ sendmail_conf() { if [ -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf ]; then echo "pwcheck_method: %%PWCHECK_METHOD%%" > ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp - if cmp -s ${PKG_PREFIX}/lib/sasl/Sendmail.conf ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp; then - rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf - fi - rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp + remove_file ${PKG_PREFIX}/lib/sasl/Sendmail.conf fi } case $2 in DEINSTALL) delete_sasldb + delete_rc_conf_d sendmail_conf ;; POST-DEINSTALL) Index: pkg-install =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-install,v retrieving revision 1.10 diff -u -r1.10 pkg-install --- pkg-install 14 Aug 2002 18:39:45 -0000 1.10 +++ pkg-install 4 Oct 2002 01:16:26 -0000 @@ -90,6 +90,23 @@ fi } +create_rc_conf_d() { + PWCHECK_CONF=${PKG_PREFIX}/etc/rc.conf.d/cyrus_pwcheck + SASLAUTHD_CONF=${PKG_PREFIX}/etc/rc.conf.d/saslauthd1 + + if [ ! -d ${PKG_PREFIX}/etc/rc.conf.d ]; then + mkdir ${PKG_PREFIX}/etc/rc.conf.d + fi + if [ ! -f ${SASLAUTHD_CONF} ]; then + echo "saslauthd1_enable=%%ENABLE_SASLAUTHD%%" > ${SASLAUTHD_CONF} + echo "saslauthd1_flags=\"-a pam\"" >> ${SASLAUTHD_CONF} + fi + if [ ! -f ${PWCHECK_CONF} ]; then + echo "cyrus_pwcheck_enable=%%ENABLE_PWCHECK%%" > ${PWCHECK_CONF} + echo "cyrus_pwcheck_program=${PKG_PREFIX}/sbin/%%PWCHECK%%" >> ${PWCHECK_CONF} + fi +} + case $2 in PRE-INSTALL) create_user @@ -97,6 +114,7 @@ POST-INSTALL) if [ "${PKG_BATCH}" = "NO" ]; then create_sasldb + create_rc_conf_d sendmail_conf fi ;; Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/pkg-plist,v retrieving revision 1.17 diff -u -r1.17 pkg-plist --- pkg-plist 1 Sep 2002 16:38:33 -0000 1.17 +++ pkg-plist 3 Oct 2002 22:59:52 -0000 @@ -1,8 +1,9 @@ @comment The following makes sure that the pwcheck and saslauthd @comment daemons are stopped before removing the files. -@unexec if [ -f /var/run/pwcheck.pid ] ; then %D/etc/rc.d/pwcheck.sh stop ; echo " stopped." ; fi +@unexec if [ -f /var/run/pwcheck.pid ] ; then %D/etc/rc.d/cyrus_pwcheck.sh stop ; echo " stopped." ; fi @unexec if [ -f /var/state/saslauthd1/mux.pid ] ; then %D/etc/rc.d/saslauthd1.sh stop ; echo " stopped." ; fi -etc/rc.d/pwcheck.sh +etc/rc.d/cyrus_pwcheck.sh +etc/rc.d/cyrus_sasl1 etc/rc.d/saslauthd1.sh include/sasl1/hmac-md5.h include/sasl1/md5.h @@ -82,6 +83,7 @@ %%PORTDOCS%%%%DOCSDIR%%/rfc2831.txt %%PORTDOCS%%%%DOCSDIR%%/gssapi.html %%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%%%DOCSDIR%%/macosx.html %%PORTDOCS%%%%DOCSDIR%%/programming.html %%PORTDOCS%%%%DOCSDIR%%/sysadmin.html %%PORTDOCS%%@dirrm %%DOCSDIR%% Index: files/cyrus_sasl1 =================================================================== RCS file: files/cyrus_sasl1 diff -N files/cyrus_sasl1 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/cyrus_sasl1 4 Oct 2002 01:39:56 -0000 @@ -0,0 +1,16 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: sasl1 +# REQUIRE: DAEMON %%MYSQL_REQ%% +# KEYWORD: FreeBSD +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts copy +# cyrus_sasl1 to /etc/rc.d/cyrus_sasl1 + +# This is a dummy dependancy, to ensure that daemons are run _before_ +# `sasl1' is available. + Index: files/patch-ab =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/files/patch-ab,v retrieving revision 1.14 diff -u -r1.14 patch-ab --- files/patch-ab 18 Jun 2002 06:16:47 -0000 1.14 +++ files/patch-ab 10 Sep 2002 05:51:35 -0000 @@ -1,5 +1,5 @@ ---- configure.in.orig Wed May 22 20:49:46 2002 -+++ configure.in Thu May 23 16:52:07 2002 +--- configure.in.orig Tue Sep 10 00:34:57 2002 ++++ configure.in Tue Sep 10 00:34:57 2002 @@ -66,8 +66,12 @@ dnl check for -R, etc. switch CMU_GUESS_RUNPATH_SWITCH @@ -24,37 +24,7 @@ fi AM_CONDITIONAL(SAMPLE, test "$enable_sample" = yes) -@@ -149,11 +151,13 @@ - AC_CHECK_HEADER(db.h, - AC_CHECK_LIB(db-3, db_create, SASL_DB_LIB="-ldb-3"; - dblib="berkeley", -+ AC_CHECK_LIB(db3, db_create, SASL_DB_LIB="-ldb3"; -+ dblib="berkeley", - AC_CHECK_LIB(db, db_create, SASL_DB_LIB="-ldb"; - dblib="berkeley", - AC_CHECK_LIB(db, db_open, SASL_DB_LIB="-ldb"; - dblib="berkeley", -- dblib="no"))), -+ dblib="no")))), - dblib="no") - ;; - gdbm) -@@ -175,11 +179,13 @@ - AC_CHECK_HEADER(db.h, - AC_CHECK_LIB(db-3, db_create, SASL_DB_LIB="-ldb-3"; - dblib="berkeley", -+ AC_CHECK_LIB(db3, db_create, SASL_DB_LIB="-ldb3"; -+ dblib="berkeley", - AC_CHECK_LIB(db, db_create, SASL_DB_LIB="-ldb"; - dblib="berkeley", - AC_CHECK_LIB(db, db_open, SASL_DB_LIB="-ldb"; - dblib="berkeley", -- dblib="no"))), -+ dblib="no")))), - dblib="no") - if test "$dblib" = no; then - dnl How about ndbm? -@@ -229,6 +235,13 @@ +@@ -239,6 +241,13 @@ berkeley) SASL_DB_BACKEND="db_${dblib}.lo" AC_DEFINE(SASL_BERKELEYDB) @@ -68,25 +38,3 @@ ;; *) AC_MSG_WARN([Disabling SASL authentication database support]) -@@ -534,12 +547,16 @@ - fi - - if test "$with_des" != no; then -+ case "$host_os" in -+ freebsd*) -+ COM_ERR="-lcom_err" -+ ;; -+ esac - AC_CHECK_HEADER(krb.h, -- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="", -- AC_CHECK_LIB(krb, krb_mk_priv, COM_ERR="-lcom_err", -- AC_WARN(No Kerberos V4 found); krb4=no, -ldes -lcom_err), -- -ldes), -- AC_WARN(No Kerberos V4 found); krb4=no) -+ AC_CHECK_LIB(krb, krb_mk_priv,:, -+ AC_WARN(No Kerberos V4 found); krb4=no, -+ -ldes ${COM_ERR}), -+ AC_WARN(No Kerberos V4 headers found); krb4=no) - else - AC_WARN(No DES library found for Kerberos V4 support) - krb4=no Index: files/patch-plugins::gssapi.c =================================================================== RCS file: files/patch-plugins::gssapi.c diff -N files/patch-plugins::gssapi.c --- files/patch-plugins::gssapi.c 22 Jan 2002 05:30:03 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,15 +0,0 @@ ---- plugins/gssapi.c.orig Fri Mar 9 23:56:46 2001 -+++ plugins/gssapi.c Mon Jan 21 21:03:32 2002 -@@ -71,6 +71,12 @@ - #include - #include - -+#ifdef HAVE_UNISTD_H -+#include -+#endif -+ -+#include -+ - #ifdef WIN32 - /* This must be after sasl.h */ - # include "saslgssapi.h" Index: files/patch-saslauthd::Makefile.am =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/files/patch-saslauthd::Makefile.am,v retrieving revision 1.1 diff -u -r1.1 patch-saslauthd::Makefile.am --- files/patch-saslauthd::Makefile.am 14 Aug 2002 18:39:46 -0000 1.1 +++ files/patch-saslauthd::Makefile.am 10 Sep 2002 06:26:56 -0000 @@ -1,11 +1,10 @@ ---- saslauthd/Makefile.am.orig Fri Mar 23 19:41:35 2001 -+++ saslauthd/Makefile.am Tue Aug 13 13:57:10 2002 -@@ -2,7 +2,7 @@ - man_MANS = saslauthd.8 - - saslauthd_SOURCES = saslauthd.c mechanisms.c globals.h mechanisms.h auth_dce.c auth_dce.h auth_getpwent.c auth_getpwent.h auth_krb4.c auth_krb4.h auth_pam.c auth_pam.h auth_rimap.c auth_rimap.h auth_shadow.c auth_shadow.h auth_sia.c auth_sia.h --saslauthd_LDADD = @SASL_KRB_LIB@ -+saslauthd_LDADD = @SASL_KRB_LIB@ @LIB_PAM@ @LIB_CRYPT@ - +--- saslauthd/Makefile.am.orig Thu Dec 20 20:31:19 2001 ++++ saslauthd/Makefile.am Tue Sep 10 01:26:07 2002 +@@ -7,5 +7,5 @@ INCLUDES = -I$(top_srcdir)/include - EXTRA_DIST = saslauthd.8 + + install-data-local: +- $(mkinstalldirs) $(DESTDIR)$(mandir)/cat8 +- $(INSTALL_DATA) saslauthd.8 $(DESTDIR)$(mandir)/cat8/saslauthd.8 ++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man8 ++ $(INSTALL_DATA) saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 Index: files/pwcheck.sh =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/files/pwcheck.sh,v retrieving revision 1.5 diff -u -r1.5 pwcheck.sh --- files/pwcheck.sh 14 Aug 2002 18:39:46 -0000 1.5 +++ files/pwcheck.sh 4 Oct 2002 17:03:53 -0000 @@ -3,64 +3,105 @@ # $FreeBSD: ports/security/cyrus-sasl/files/pwcheck.sh,v 1.5 2002/08/14 18:39:46 knu Exp $ # -action=$1 - -PREFIX=%%PREFIX%% - -# Suck in the configuration variables. -if [ -z "${source_rc_confs_defined}" ]; then - if [ -r /etc/defaults/rc.conf ]; then - . /etc/defaults/rc.conf - source_rc_confs - elif [ -r /etc/rc.conf ]; then - . /etc/rc.conf - fi -fi - -# The following sasl_pwcheck_* variables may be defined in rc.conf +# PROVIDE: cyrus_pwcheck +# REQUIRE: DAEMON +# BEFORE: mail imap +# KEYWORD: FreeBSD shutdown # -# sasl_pwcheck_enable - Set to YES to enable pwcheck -# Default: %%ENABLEPWCHECK%% +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move cyrus_pwcheck.sh to /etc/rc.d/cyrus_pwcheck + +# Define the following cyrus_pwcheck_* variables in one of the following: +# /etc/rc.conf +# /etc/rc.conf.d/pwcheck +# ${prefix}/etc/rc.conf.d/pwcheck # -# sasl_pwcheck_program - Path to pwcheck program (pwcheck/pwcheck_pam) -# Default: ${PREFIX}/sbin/%%PWCHECK%% - -if [ -z "${sasl_pwcheck_enable}" ] ; then - sasl_pwcheck_enable=%%ENABLEPWCHECK%% -fi +# cyrus_pwcheck_enable - Set to YES to enable pwcheck +# Default: %%ENABLE_PWCHECK%% +# +# cyrus_pwcheck_program - Path to pwcheck program (pwcheck/pwcheck_pam) +# Default: ${prefix}/sbin/%%PWCHECK%% -if [ -z "${sasl_pwcheck_program}" ]; then - sasl_pwcheck_program=${PREFIX}/sbin/%%PWCHECK%% -fi +prefix=%%PREFIX%% -rc=0 +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr -case "${sasl_pwcheck_enable}" in - [Yy][Ee][Ss]) - case "${action}" in - - start) - if [ -x ${sasl_pwcheck_program} ] ; then - ${sasl_pwcheck_program} && echo -n " pwcheck" + name="cyrus_pwcheck" + rcvar=`set_rcvar` + command=${prefix}/sbin/%%PWCHECK%% + pidfile="/var/run/pwcheck.pid" + + # The below may be removed when load_local_rc_config is added to rc.subr + + if [ -f ${prefix}/etc/rc.conf.d/"$name" ]; then + debug "Sourcing ${prefix}/etc/rc.conf.d/${name}" + . ${prefix}/etc/rc.conf.d/"$name" + fi + + load_rc_config $name + + if [ -z "${cyrus_pwcheck_enable}" ] ; then + cyrus_pwcheck_enable=%%ENABLE_PWCHECK%% + fi + + # The above may be removed when load_local_rc_config is added to rc.subr + # + # load_local_rc_config $name + run_rc_command "$1" +else + # Suck in the configuration variables. + if [ -z "${source_rc_confs_defined}" ]; then + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf fi - ;; + fi - stop) - if [ -r /var/run/pwcheck.pid ]; then - kill `cat /var/run/pwcheck.pid` && echo -n " pwcheck" - rm /var/run/pwcheck.pid - fi - ;; + if [ -f ${prefix}/etc/rc.conf.d/cyrus_pwcheck" ]; then + . ${prefix}/etc/rc.conf.d/cyrus_pwcheck}" + fi + + if [ -z "${cyrus_pwcheck_enable}" ] ; then + cyrus_pwcheck_enable=%%ENABLE_PWCHECK%% + fi + + if [ -z "${cyrus_pwcheck_program}" ]; then + cyrus_pwcheck_program=${prefix}/sbin/%%PWCHECK%% + fi + + rc=0 + case "${cyrus_pwcheck_enable}" in + [Yy][Ee][Ss]) + case "${action}" in + + start) + if [ -x ${cyrus_pwcheck_program} ] ; then + ${cyrus_pwcheck_program} && echo -n " cyrus_pwcheck" + fi + ;; + + stop) + if [ -r /var/run/pwcheck.pid ]; then + kill `cat /var/run/pwcheck.pid` && echo -n " cyrus_pwcheck" + rm /var/run/pwcheck.pid + fi + ;; + + *) + echo "usage: $0 {start|stop}" 1>&2 + rc=64 + ;; + esac + ;; *) - echo "usage: $0 {start|stop}" 1>&2 - rc=64 + rc=0 ;; esac - ;; - *) - rc=0 - ;; -esac -exit $rc + exit $rc +fi Index: files/saslauthd.sh =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/files/saslauthd.sh,v retrieving revision 1.1 diff -u -r1.1 saslauthd.sh --- files/saslauthd.sh 14 Aug 2002 18:39:46 -0000 1.1 +++ files/saslauthd.sh 4 Oct 2002 17:04:09 -0000 @@ -3,73 +3,124 @@ # $FreeBSD: ports/security/cyrus-sasl/files/saslauthd.sh,v 1.1 2002/08/14 18:39:46 knu Exp $ # -action=$1 - -PREFIX=%%PREFIX%% - -# Suck in the configuration variables. -if [ -z "${source_rc_confs_defined}" ]; then - if [ -r /etc/defaults/rc.conf ]; then - . /etc/defaults/rc.conf - source_rc_confs - elif [ -r /etc/rc.conf ]; then - . /etc/rc.conf - fi -fi - -# The following sasl_saslauthd_* variables may be defined in rc.conf +# PROVIDE: saslauthd1 +# REQUIRE: DAEMON +# BEFORE: mail imap +# KEYWORD: FreeBSD shutdown # -# sasl_saslauthd1_enable - Set to YES to enable saslauthd -# Default: %%ENABLESASLAUTHD%% +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move saslauthd1.sh to /etc/rc.d/saslauthd1 + +# Define the following saslauthd1_* variables in one of the following: +# /etc/rc.conf +# /etc/rc.conf.d/saslauthd1 +# ${prefix}/etc/rc.conf.d/saslauthd1 # -# sasl_saslauthd1_program - Path to saslauthd program -# Default: ${PREFIX}/sbin/saslauthd1 +# saslauthd1_enable - Set to YES to enable saslauthd +# Default: %%ENABLE_SASLAUTHD%% # -# sasl_saslauthd1_flags - Flags to saslauthd program -# Default: -a pam +# saslauthd1_program - Path to saslauthd program +# Default: ${prefix}/sbin/saslauthd1 +# +# saslauthd1_flags - Flags to saslauthd program +# Default: -a pam -if [ -z "${sasl_saslauthd1_enable}" ]; then - sasl_saslauthd1_enable=%%ENABLESASLAUTHD%% -fi +prefix=%%PREFIX%% -if [ -z "${sasl_saslauthd1_program}" ]; then - sasl_saslauthd1_program=${PREFIX}/sbin/saslauthd1 -fi +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr -if [ -z "${sasl_saslauthd1_flags}" ]; then - sasl_saslauthd1_flags="-a pam" -fi + name="saslauthd1" + rcvar=`set_rcvar` + command="${prefix}/sbin/${name}" + pidfile="/var/state/${name}/mux.pid" + + # The below may be removed when load_local_rc_config is added to rc.subr + + if [ -f ${prefix}/etc/rc.conf.d/"$name" ]; then + debug "Sourcing ${prefix}/etc/rc.conf.d/${name}" + . ${prefix}/etc/rc.conf.d/"$name" + fi + + load_rc_config $name + + if [ -z "${saslauthd1_enable}" ]; then + saslauthd1_enable=%%ENABLE_SASLAUTHD%% + fi + + # The above may be removed when load_local_rc_config is added to rc.subr + # + # load_local_rc_config $name + run_rc_command "$1" +else + # Suck in the configuration variables. + if [ -z "${source_rc_confs_defined}" ]; then + if [ -r /etc/defaults/rc.conf ]; then + . /etc/defaults/rc.conf + source_rc_confs + elif [ -r /etc/rc.conf ]; then + . /etc/rc.conf + fi + fi -rc=0 + if [ -f ${prefix}/etc/rc.conf.d/saslauthd1 ]; then + . ${prefix}/etc/rc.conf.d/saslauthd1 + fi + + if [ -n "${sasl_saslauthd1_enable}" ]; then + echo "sasl_saslauthd1_enable has been depreciated, use saslauthd1_enable instead" + saslauthd1_enable=$sasl_saslauthd1_enable + fi + + if [ -z "${saslauthd1_enable}" ]; then + saslauthd1_enable=%%ENABLE_SASLAUTHD%% + fi + + if [ -z "${saslauthd1_program}" ]; then + saslauthd1_program=${prefix}/sbin/saslauthd1 + fi + + if [ -n "${sasl_saslauthd1_flags}" ]; then + echo "sasl_saslauthd1_flags has been depreciated, use saslauthd1_flags instead" + saslauthd1_flags=$sasl_saslauthd1_flags + fi + + if [ -z "${saslauthd1_flags}" ]; then + saslauthd1_flags="-a pam" + fi -case "${sasl_saslauthd1_enable}" in - [Yy][Ee][Ss]) - case "${action}" in - - start) - if [ -x ${sasl_saslauthd1_program} ] ; then - ${sasl_saslauthd1_program} ${sasl_saslauthd1_flags} \ - && echo -n " saslauthd1" - fi - ;; + rc=0 - stop) - if [ -r /var/state/saslauthd1/mux.pid ]; then - kill `cat /var/state/saslauthd1/mux.pid` && \ - echo -n " saslauthd1" - rm /var/state/saslauthd1/mux.pid - fi + case "${saslauthd1_enable}" in + [Yy][Ee][Ss]) + case "${1}" in + + start) + if [ -x ${saslauthd1_program} ] ; then + ${saslauthd1_program} ${saslauthd1_flags} \ + && echo -n " saslauthd1" + fi + ;; + + stop) + if [ -r /var/state/saslauthd1/mux.pid ]; then + kill `cat /var/state/saslauthd1/mux.pid` && \ + echo -n " saslauthd1" + rm /var/state/saslauthd1/mux.pid + fi + ;; + + *) + echo "usage: $0 {start|stop}" 1>&2 + rc=64 + ;; + esac ;; - *) - echo "usage: $0 {start|stop}" 1>&2 - rc=64 + rc=0 ;; esac - ;; - *) - rc=0 - ;; -esac -exit $rc + exit $rc +fi Index: scripts/configure.sasl =================================================================== RCS file: /home/ncvs/ports/security/cyrus-sasl/scripts/configure.sasl,v retrieving revision 1.14 diff -u -r1.14 configure.sasl --- scripts/configure.sasl 22 Aug 2002 19:13:37 -0000 1.14 +++ scripts/configure.sasl 4 Oct 2002 20:22:03 -0000 @@ -93,7 +93,7 @@ ${MKDIR} ${WRKDIRPREFIX}${REALCURDIR} exec > ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc -echo "PREFIX= ${PREFIX}" +echo "PREFIX= ${PREFIX}" while [ "$1" ]; do case $1 in @@ -133,6 +133,7 @@ \"MySQL\") echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" echo "CONFIGURE_ARGS+= --with-mysql=\${PREFIX}" + MYSQL_REQ=mysql MSG=1 ;; \"OpenLDAP1\") @@ -144,7 +145,9 @@ echo "LIB_DEPENDS+= ldap.1:\${PORTSDIR}/net/openldap" echo "LIB_DEPENDS+= lber.1:\${PORTSDIR}/net/openldap" echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}" + LDAP_REQ=ldap OPENLDAP=1 + MSG=1 ;; \"OpenLDAP2\") if [ "$OPENLDAP" ]; then @@ -155,22 +158,22 @@ echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap2" echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap2" echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}" + LDAP_REQ=ldap OPENLDAP=1 + MSG=1 ;; \"PWCHECK\") if [ "$PWCHECK" ]; then echo "PWCHECK or PAMPWCHECK must be choosen seperately: Defaulting to PAMPWCHECK" > /dev/stderr else - echo "PWCHECK_SUB+= -e \"s;%%PWCHECK%%;pwcheck;g\"" - PWCHECK=1 + PWCHECK=pwcheck fi ;; \"PAMPWCHECK\") if [ "$PWCHECK" ]; then echo "PWCHECK or PAMPWCHECK must be choosen seperately: Defaulting to PWCHECK" > /dev/stderr else - echo "PWCHECK_SUB+= -e \"s;%%PWCHECK%%;pwcheck_pam;g\"" - PWCHECK=1 + PWCHECK=pwcheck_pam fi ;; \"SASLAUTHD\") @@ -188,24 +191,35 @@ shift done -if [ ! "${PWCHECK}" ]; then - echo "PWCHECK_SUB+= -e \"s;%%PWCHECK%%;pwcheck;g\"" -fi - -if [ "$SASLAUTHD" ]; then - echo "PWCHECK_SUB+= -e \"s;%%ENABLEPWCHECK%%;no;g\"" - echo "PWCHECK_METHOD= saslauthd" - echo "SASLAUTHD_SUB+= -e \"s;%%ENABLESASLAUTHD%%;yes;g\"" +if [ "${SASLAUTHD}" ]; then + ENABLE_PWCHECK=no + PWCHECK_METHOD=saslauthd + ENABLE_SASLAUTHD=yes + if [ -z "${PWCHECK}" ]; then + PWCHECK=pwcheck + fi else - if [ "$PWCHECK" ]; then - echo "PWCHECK_SUB+= -e \"s;%%ENABLEPWCHECK%%;yes;g\"" + if [ "${PWCHECK}" ]; then + ENABLE_PWCHECK=yes else - echo "PWCHECK_SUB+= -e \"s;%%ENABLEPWCHECK%%;no;g\"" + ENABLE_PWCHECK=no + PWCHECK=pwcheck fi - echo "PWCHECK_METHOD+= pwcheck" - echo "SASLAUTHD_SUB+= -e \"s;%%ENABLESASLAUTHD%%;no;g\"" + PWCHECK_METHOD=pwcheck + ENABLE_SASLAUTHD=no fi +echo "PWCHECK= ${PWCHECK}" +echo "PWCHECK_METHOD= ${PWCHECK_METHOD}" +echo "ENABLE_PWCHECK= ${ENABLE_PWCHECK}" +echo "ENABLE_SASLAUTHD= ${ENABLE_SASLAUTHD}" + +echo "RC_SCRIPTS_SUB+= PREFIX=\${PREFIX} \\" +echo " PWCHECK=\${PWCHECK} \\" +echo " ENABLE_PWCHECK=\${ENABLE_PWCHECK} \\" +echo " ENABLE_SASLAUTHD=\${ENABLE_SASLAUTHD} \\" +echo " MYSQL_REQ=${MYSQL_REQ}" + if [ ! "${DEFJAVA}" ]; then echo "PLIST_SUB+= JAVASASL=\"@comment \"" fi @@ -214,6 +228,16 @@ echo "SASLDB_NAME= sasldb.db" fi -if [ "$OPENLDAP" ]; then - echo "LDAP_MYSQL_MSG= \"See sysadmin.html in the Cyrus-SASL docs directory for informaion on using LDAP or MySQL for authentication.\"" +if [ "${MSG}" ]; then + if [ -n "${LDAP_REQ}" ]; then + METHOD="LDAP" + + if [ -f -n "${MYSQL_REQ}" ]; then + METHOD="LDAP or MySQL" + fi + elif [ -n "${MYSQL_REQ}" ]; then + METHOD="MySQL" + fi + + echo "LDAP_MYSQL_MSG= \"See sysadmin.html in the Cyrus-SASL docs directory for informaion on using ${METHOD} for authentication.\"" fi >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message