[Pkg-openldap-devel] Bug#369484: slapd: Bug in initscript,
could wreck database
Helge Hafting
helgehaf at aitel.hist.no
Tue May 30 06:53:40 UTC 2006
Package: slapd
Version: 2.3.23-1
Severity: normal
I was reading the /etc/init.d/slapd script, in order to make
an equivalent start/stop script for initng.
I noticed this snippet of code which is wrong:
# Make sure there is no slapcat and no slapd running as we might
# break the DB in that case
if pidof /usr/lib/slapd >/dev/null; then
echo -n " (slapd running, no recovery), "
return 0
fi
The poblem here is that /usr/lib/slapd is the wrong path.
slapd lives in /usr/sbin, so the correct would be
if pidof /usr/sbin/slapd >/dev/null; then
As it stands, the test will never ever trigger. Now, the
case where it is needed is unlikely to happen, but it is
possible if slapd is started manually and then the initscript runs
somehow. Then BDB could break.
The obvious fix is to change the line as above. I have tested the
pidof command,
pidof /usr/lib/slapd does nothing, while
pidof /usr/sbin/slapd gives me the correct pid.
Helge Hafting
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (900, 'testing'), (800, 'unstable'), (800, 'stable'), (700, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-rc5
Locale: LANG=nb_NO.UTF-8, LC_CTYPE=nb_NO.UTF-8 (charmap=UTF-8)
Versions of packages slapd depends on:
ii coreutils [fileutils] 5.94-1 The GNU core utilities
ii debconf [debconf-2.0] 1.5.1 Debian configuration management sy
ii fileutils 5.94-1 The GNU file management utilities
ii libc6 2.3.6-9 GNU C Library: Shared libraries
ii libdb4.2 4.2.52-23.1 Berkeley v4.2 Database Libraries [
ii libiodbc2 3.52.4-3 iODBC Driver Manager
ii libldap-2.3-0 2.3.23-1 OpenLDAP libraries
ii libltdl3 1.5.22-4 A system independent dlopen wrappe
ii libperl5.8 5.8.8-4 Shared Perl library
ii libsasl2 2.1.19.dfsg1-0.2 Authentication abstraction library
ii libslp1 1.2.1-5 OpenSLP libraries
ii libssl0.9.8 0.9.8a-8 SSL shared libraries
ii libwrap0 7.6.dbs-9 Wietse Venema's TCP wrappers libra
ii perl [libmime-base64-pe 5.8.8-4 Larry Wall's Practical Extraction
ii psmisc 22.2-1 Utilities that use the proc filesy
Versions of packages slapd recommends:
ii db4.2-util 4.2.52-23.1 Berkeley v4.2 Database Utilities
ii libsasl2-modules 2.1.19.dfsg1-0.2 Pluggable Authentication Modules f
-- debconf-show failed
More information about the Pkg-openldap-devel
mailing list