From 4c8f60bfd03a8946a315e47a70a3ea2210467a75 Mon Sep 17 00:00:00 2001 From: Jan Šafránek Date: Oct 13 2008 10:16:30 +0000 Subject: - add SLAPD_SHUTDOWN_TIMEOUT to /etc/sysconfig/ldap, allowing admins to set non-default slapd shutdown timeout - add checkpoint to default slapd.conf file Resolves: #458679 --- diff --git a/ldap.init b/ldap.init index 42aa12a..289852d 100644 --- a/ldap.init +++ b/ldap.init @@ -30,6 +30,7 @@ SLAPD_LDAP="yes" SLAPD_LDAPI="no" SLAPD_LDAPS="no" +SLAPD_SHUTDOWN_TIMEOUT=3 # OPTIONS, SLAPD_OPTIONS and KTB5_KTNAME are not defined # Source an auxiliary options file if we have one @@ -188,7 +189,7 @@ function stop() { # Stop daemons. prog=`basename ${slapd}` echo -n $"Stopping $prog: " - killproc -p $pidfile ${slapd} + killproc -p $pidfile -d $SLAPD_SHUTDOWN_TIMEOUT ${slapd} RETVAL=$? [ $RETVAL -eq 0 ] && rm -f $lockfile /var/run/slapd.args echo diff --git a/ldap.sysconfig b/ldap.sysconfig index 4e45769..7b11b83 100644 --- a/ldap.sysconfig +++ b/ldap.sysconfig @@ -18,3 +18,6 @@ # Run slapd with -h "... ldaps:/// ..." # yes/no, default: no #SLAPD_LDAPS=no + +# Maximum allowed time to wait for slapd shutdown on 'service ldap stop' (in seconds) +#SLAPD_SHUTDOWN_TIMEOUT=3 diff --git a/openldap-2.4.6-config.patch b/openldap-2.4.6-config.patch index 5dc3c57..0c8913d 100644 --- a/openldap-2.4.6-config.patch +++ b/openldap-2.4.6-config.patch @@ -1,6 +1,6 @@ -diff -up openldap-2.4.11/servers/slapd/slapd.conf.patch1 openldap-2.4.11/servers/slapd/slapd.conf ---- openldap-2.4.11/servers/slapd/slapd.conf.patch1 2007-02-13 21:22:22.000000000 +0100 -+++ openldap-2.4.11/servers/slapd/slapd.conf 2008-09-01 09:57:09.000000000 +0200 +diff -up openldap-2.4.11/servers/slapd/slapd.conf.config openldap-2.4.11/servers/slapd/slapd.conf +--- openldap-2.4.11/servers/slapd/slapd.conf.config 2007-02-13 21:22:22.000000000 +0100 ++++ openldap-2.4.11/servers/slapd/slapd.conf 2008-10-09 16:13:52.000000000 +0200 @@ -2,22 +2,57 @@ # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. @@ -67,7 +67,7 @@ diff -up openldap-2.4.11/servers/slapd/slapd.conf.patch1 openldap-2.4.11/servers # Sample security restrictions # Require integrity protection (prevent hijacking) -@@ -47,19 +82,41 @@ argsfile %LOCALSTATEDIR%/run/slapd.args +@@ -47,19 +82,42 @@ argsfile %LOCALSTATEDIR%/run/slapd.args # rootdn can always read and write EVERYTHING! ####################################################################### @@ -77,6 +77,7 @@ diff -up openldap-2.4.11/servers/slapd/slapd.conf.patch1 openldap-2.4.11/servers database bdb suffix "dc=my-domain,dc=com" ++checkpoint 1024 15 rootdn "cn=Manager,dc=my-domain,dc=com" # Cleartext passwords, especially for the rootdn, should -# be avoid. See slappasswd(8) and slapd.conf(5) for details. diff --git a/openldap.spec b/openldap.spec index af9d925..7b87fac 100644 --- a/openldap.spec +++ b/openldap.spec @@ -11,7 +11,7 @@ Summary: The configuration files, libraries, and documentation for OpenLDAP Name: openldap Version: %{version} -Release: 2%{?dist} +Release: 3%{?dist} License: OpenLDAP Group: System Environment/Daemons Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz @@ -603,6 +603,11 @@ fi %attr(0644,root,root) %{evolution_connector_libdir}/*.a %changelog +* Mon Oct 13 2008 Jan Safranek 2.4.11-3 +- add SLAPD_SHUTDOWN_TIMEOUT to /etc/sysconfig/ldap, allowing admins + to set non-default slapd shutdown timeout +- add checkpoint to default slapd.conf file (#458679) + * Mon Sep 1 2008 Jan Safranek 2.4.11-2 - provide ldif2ldbm functionality for migrationtools - rediff all patches to get rid of patch fuzz