重新编译cyrus-sasl, ./configure 中加入-enable-login选项。
新的PKGBUILD
引用:# $Id: PKGBUILD,v 1.12 2007/01/07 21:39:42 tpowa Exp $
# Maintainer: eric
# Modified by Kevin Qian, 2007-1-7
pkgname=cyrus-sasl
pkgver=2.1.20
pkgrel=2
pkgdesc="SASL authentication daemon"
url="http://asg.web.cmu.edu/cyrus/download/"
depends=('pam' 'openssl' 'db' 'bash')
backup=(etc/conf.d/saslauthd)
source=(ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/$pkgname-$pkgver.tar.gz \
saslauthd saslauthd.conf.d)
md5sums=('268ead27f4ac39bcfe17d9e38e0f2977' '697dfb51206c398bc976ce9f4cffe72d' \
'dd12579e275a0924635e5ff003d301ab')
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr --enable-krb4=no --enable-login
/usr/bin/make || return 1
/usr/bin/make DESTDIR=$startdir/pkg install
/bin/mkdir -p $startdir/pkg/var/state/saslauthd
/bin/install -D -m755 ../saslauthd $startdir/pkg/etc/rc.d/saslauthd
/bin/install -D -m644 ../saslauthd.conf.d $startdir/pkg/etc/conf.d/saslauthd
}
saslauthd
引用:#!/bin/bash
# source application-specific settings
[ -f /etc/conf.d/saslauthd ] && . /etc/conf.d/saslauthd
. /etc/rc.conf
. /etc/rc.d/functions
DAEMON_NAME="saslauthd"
SASLAUTHD_BIN=/usr/sbin/saslauthd
SASLAUTHD_PID=`pidof -o %PPID $SASLAUTHD_BIN`
case "$1" in
start)
stat_busy "Starting $DAEMON_NAME"
[ -z "$SASLAUTHD_PID" ] && $SASLAUTHD_BIN $SASLAUTHD_OPTS
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
echo `pidof -o %PPID $SASLAUTHD_BIN` > /var/run/$DAEMON_NAME.pid
fi
add_daemon $DAEMON_NAME
stat_done
;;
stop)
stat_busy "Stopping $DAEMON_NAME"
[ ! -z "$SASLAUTHD_PID" ] && kill $SASLAUTHD_PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm /var/run/$DAEMON_NAME.pid &> /dev/null
fi
rm_daemon $DAEMON_NAME
stat_done
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
esac
exit 0
# vim: ts=2 sw=2 et ft=sh
saslauthd.conf.d
引用:SASLAUTHD_OPTS="-m /var/state/saslauthd -a pam"

