rpms/cyrus-sasl/devel cyrus-sasl-2.1.22-ldap-timeout.patch, NONE, 1.1 cyrus-sasl.spec, 1.74, 1.75 saslauthd.init, 1.4, 1.5

Tomáš Mráz tmraz at fedoraproject.org
Fri Jan 23 16:06:05 UTC 2009


Author: tmraz

Update of /cvs/pkgs/rpms/cyrus-sasl/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17208

Modified Files:
	cyrus-sasl.spec saslauthd.init 
Added Files:
	cyrus-sasl-2.1.22-ldap-timeout.patch 
Log Message:
* Fri Jan 23 2009 Tomas Mraz <tmraz at redhat.com> - 2.1.22-20
- set LDAP_OPT_TIMEOUT (#326452)
- provide LSB compatible init script (#246900)


cyrus-sasl-2.1.22-ldap-timeout.patch:

--- NEW FILE cyrus-sasl-2.1.22-ldap-timeout.patch ---
commit c9447e1c3ffba88783e5d9396b832be82d3c78fc
Author: Kazuo Ito <ito.kazuo at 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);


Index: cyrus-sasl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cyrus-sasl/devel/cyrus-sasl.spec,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- cyrus-sasl.spec	26 Sep 2008 10:05:40 -0000	1.74
+++ cyrus-sasl.spec	23 Jan 2009 16:05:35 -0000	1.75
@@ -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 @@
 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 @@
 %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 @@
 %{_sbindir}/sasl2-shared-mechlist
 
 %changelog
+* Fri Jan 23 2009 Tomas Mraz <tmraz at redhat.com> - 2.1.22-20
+- set LDAP_OPT_TIMEOUT (#326452)
+- provide LSB compatible init script (#246900)
+
 * Fri Sep 26 2008 Tomas Mraz <tmraz at redhat.com> - 2.1.22-19
 - always use the current external db4 when linking,
   thanks to Dan Horak for the original patch (#464098)


Index: saslauthd.init
===================================================================
RCS file: /cvs/pkgs/rpms/cyrus-sasl/devel/saslauthd.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- saslauthd.init	1 Jul 2008 21:35:14 -0000	1.4
+++ saslauthd.init	23 Jan 2009 16:05:35 -0000	1.5
@@ -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 @@
 # 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 @@
 	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
 	;;
+  reload)
+	rh_status_q || exit 7
+	reload
+	;;
+  force-reload)
+	force_reload
+	;;
   status)
-	status $path
+	rh_status
 	;;
-  condrestart)
-  	[ -f /var/lock/subsys/$prog ] && restart || :
+  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 $?




More information about the fedora-extras-commits mailing list