- set LDAP_OPT_TIMEOUT (#326452)
- provide LSB compatible init script (#246900)
This commit is contained in:
parent
2009bcdf56
commit
6230a7151e
25
cyrus-sasl-2.1.22-ldap-timeout.patch
Normal file
25
cyrus-sasl-2.1.22-ldap-timeout.patch
Normal file
@ -0,0 +1,25 @@
|
||||
commit c9447e1c3ffba88783e5d9396b832be82d3c78fc
|
||||
Author: Kazuo Ito <ito.kazuo@oss.ntt.co.jp>
|
||||
Date: Wed Dec 10 12:03:29 2008 +0900
|
||||
|
||||
support for LDAP_OPT_TIMEOUT
|
||||
|
||||
OpenLDAP since 2.4 implements support for this option in ldap_result(),
|
||||
among other things.
|
||||
|
||||
diff --git a/saslauthd/lak.c b/saslauthd/lak.c
|
||||
index 803d51f..8714265 100644
|
||||
--- a/saslauthd/lak.c
|
||||
+++ b/saslauthd/lak.c
|
||||
@@ -833,6 +833,11 @@ static int lak_connect(
|
||||
syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_NETWORK_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
|
||||
}
|
||||
|
||||
+ rc = ldap_set_option(lak->ld, LDAP_OPT_TIMEOUT, &(lak->conf->timeout));
|
||||
+ if (rc != LDAP_OPT_SUCCESS) {
|
||||
+ syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMEOUT %d.%d.", lak->conf->timeout.tv_sec, lak->conf->timeout.tv_usec);
|
||||
+ }
|
||||
+
|
||||
rc = ldap_set_option(lak->ld, LDAP_OPT_TIMELIMIT, &(lak->conf->time_limit));
|
||||
if (rc != LDAP_OPT_SUCCESS) {
|
||||
syslog(LOG_WARNING|LOG_AUTH, "Unable to set LDAP_OPT_TIMELIMIT %d.", lak->conf->time_limit);
|
@ -4,7 +4,7 @@
|
||||
Summary: The Cyrus SASL library
|
||||
Name: cyrus-sasl
|
||||
Version: 2.1.22
|
||||
Release: 19%{?dist}
|
||||
Release: 20%{?dist}
|
||||
License: BSD
|
||||
Group: System Environment/Libraries
|
||||
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
|
||||
@ -29,6 +29,7 @@ Patch30: cyrus-sasl-2.1.22-rimap.patch
|
||||
Patch31: cyrus-sasl-2.1.22-kerberos4.patch
|
||||
Patch32: cyrus-sasl-2.1.22-warnings.patch
|
||||
Patch33: cyrus-sasl-2.1.22-current-db.patch
|
||||
Patch34: cyrus-sasl-2.1.22-ldap-timeout.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
|
||||
@ -147,6 +148,7 @@ chmod -x include/*.h
|
||||
%patch31 -p1 -b .krb4
|
||||
%patch32 -p1 -b .warnings
|
||||
%patch33 -p1 -b .current-db
|
||||
%patch34 -p1 -b .ldap-timeout
|
||||
|
||||
# FIXME - we remove these files directly so that we can avoid using the -f
|
||||
# flag, which has a nasty habit of overwriting files like COPYING.
|
||||
@ -381,6 +383,10 @@ fi
|
||||
%{_sbindir}/sasl2-shared-mechlist
|
||||
|
||||
%changelog
|
||||
* Fri Jan 23 2009 Tomas Mraz <tmraz@redhat.com> - 2.1.22-20
|
||||
- set LDAP_OPT_TIMEOUT (#326452)
|
||||
- provide LSB compatible init script (#246900)
|
||||
|
||||
* Fri Sep 26 2008 Tomas Mraz <tmraz@redhat.com> - 2.1.22-19
|
||||
- always use the current external db4 when linking,
|
||||
thanks to Dan Horak for the original patch (#464098)
|
||||
|
@ -1,12 +1,21 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# saslauthd Start/Stop the SASL authentication daemon.
|
||||
# saslauthd Start/Stop the SASL authentication daemon
|
||||
#
|
||||
# chkconfig: - 95 05
|
||||
# description: saslauthd is a server process which handles plaintext \
|
||||
# chkconfig: - 65 10
|
||||
# description: Saslauthd is a server process which handles plaintext \
|
||||
# authentication requests on behalf of the cyrus-sasl library.
|
||||
# processname: saslauthd
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: saslauthd
|
||||
# Required-Start: $local_fs $network
|
||||
# Required-Stop: $local_fs $network
|
||||
# Short-Description: Start/Stop the SASL authentication daemon
|
||||
# Description: Saslauthd is a server process which handles plaintext
|
||||
# authentication requests on behalf of the cyrus-sasl library.
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
@ -24,29 +33,24 @@ RETVAL=0
|
||||
# considered boilerplate by now.
|
||||
prog=saslauthd
|
||||
path=/usr/sbin/saslauthd
|
||||
|
||||
# Ugh. Switch to a specific copy of saslauthd if there's one with $MECH
|
||||
# in its name, in case it wasn't included in the base cyrus-sasl package
|
||||
# because it would have dragged in too many undesirable dependencies.
|
||||
if test -x ${path}.${MECH} ; then
|
||||
path=/usr/sbin/saslauthd.$MECH
|
||||
fi
|
||||
lockfile=/var/lock/subsys/$prog
|
||||
|
||||
start() {
|
||||
[ -x $path ] || exit 5
|
||||
echo -n $"Starting $prog: "
|
||||
daemon $path -m $SOCKETDIR -a $MECH $FLAGS
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
|
||||
[ $RETVAL -eq 0 ] && touch $lockfile
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc $path
|
||||
killproc $prog
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
|
||||
[ $RETVAL -eq 0 ] && rm -f $lockfile
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
@ -55,25 +59,52 @@ restart() {
|
||||
start
|
||||
}
|
||||
|
||||
reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
force_reload() {
|
||||
restart
|
||||
}
|
||||
|
||||
rh_status() {
|
||||
# run checks to determine if the service is running or use generic status
|
||||
status $prog
|
||||
}
|
||||
|
||||
rh_status_q() {
|
||||
rh_status >/dev/null 2>&1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
rh_status_q && exit 0
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
rh_status_q || exit 0
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
status)
|
||||
status $path
|
||||
reload)
|
||||
rh_status_q || exit 7
|
||||
reload
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/$prog ] && restart || :
|
||||
force-reload)
|
||||
force_reload
|
||||
;;
|
||||
status)
|
||||
rh_status
|
||||
;;
|
||||
condrestart|try-restart)
|
||||
rh_status_q || exit 0
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
||||
exit 1
|
||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit $?
|
||||
|
Loading…
Reference in New Issue
Block a user