[Pkg-openldap-devel] Bug#663932: slapd: upgrade script does not handle /var/lib/ldap as symlink

Andrew Pimlott andrew at pimlott.net
Tue Mar 13 20:26:38 UTC 2012


Package: slapd
Version: 2.4.23-7.2
Severity: normal

On my system, /var/lib/ldap is a symlink (to higher-reliability storage
than my root device).  I'm not sure whether this configuration is
intended to be supported, but it has worked for me so far.  However,
during the upgrade from lenny to squeeze, I had one problem.  After the
database was dumped and loaded, the upgrade script tries to chown the
new data files to the openldap user/group.  This is starting at line 249
of slapd.postinst:

    echo -n "  - chowning database directory ($SLAPD_USER:$SLAPD_GROUP)... "
    [ -z "$SLAPD_USER" ] || \
            chown -R "$SLAPD_USER" "$dbdir"
    [ -z "$SLAPD_GROUP" ] || \
            chgrp -R "$SLAPD_GROUP" "$dbdir"
    echo "done";

This fails because it only changes the permission of the symlink, not
the target.  A simple fix would be to change it to

            chown -R "$SLAPD_USER" "$dbdir"/
            chgrp -R "$SLAPD_GROUP" "$dbdir"/

In fact, this is done in other places in slapd.postinst, so maybe this
one just got missed.  This is the only problem I found.  It would be
nice for me if this change were applied, and if this configuration were
officially supported.

Thanks!
Andrew

-- System Information:
Debian Release: 6.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages slapd depends on:
ii  adduser                3.112+nmu2        add and remove users and groups
ii  coreutils              8.5-1             GNU core utilities
ii  debconf [debconf-2.0]  1.5.36.1          Debian configuration management sy
ii  libc6                  2.11.3-2          Embedded GNU C Library: Shared lib
ii  libdb4.8               4.8.30-2          Berkeley v4.8 Database Libraries [
ii  libgnutls26            2.8.6-1+squeeze1  the GNU TLS library - runtime libr
ii  libldap-2.4-2          2.4.23-7.2        OpenLDAP libraries
ii  libltdl7               2.2.6b-2          A system independent dlopen wrappe
ii  libperl5.10            5.10.1-17squeeze3 shared Perl library
ii  libsasl2-2             2.1.23.dfsg1-7    Cyrus SASL - authentication abstra
ii  libslp1                1.2.1-7.8         OpenSLP libraries
ii  libwrap0               7.6.q-19          Wietse Venema's TCP wrappers libra
ii  lsb-base               3.2-23.2squeeze1  Linux Standard Base 3.2 init scrip
ii  perl [libmime-base64-p 5.10.1-17squeeze3 Larry Wall's Practical Extraction 
ii  psmisc                 22.11-1           utilities that use the proc file s
ii  unixodbc               2.2.14p2-1        ODBC tools libraries

Versions of packages slapd recommends:
ii  libsasl2-modules          2.1.23.dfsg1-7 Cyrus SASL - pluggable authenticat

Versions of packages slapd suggests:
ii  ldap-utils                    2.4.23-7.2 OpenLDAP utilities

-- Configuration Files:
/etc/default/slapd changed [not included]

-- debconf information excluded






More information about the Pkg-openldap-devel mailing list