Comment 15 for bug 1959054

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I hit a problem in a dep8 test that relies on slapd (from openldap) to be restarted after a "dpkg-reconfigure slapd". This restart stopped happening in 2.5.11+dfsg-1~exp1ubuntu3, which was built with 13.6ubuntu1.

See how the authentication only works after I restart slapd manually:
root@j-slapd:~# pidof slapd
3570
root@j-slapd:~# /home/ubuntu/set-selections.sh
info: Trying to set 'slapd/domain' [string] to 'example.com'
info: Loading answer for 'slapd/domain'
info: Trying to set 'shared/organization' [string] to 'example'
info: Loading answer for 'shared/organization'
info: Trying to set 'slapd/password1' [password] to 'secret'
info: Loading answer for 'slapd/password1'
info: Trying to set 'slapd/password2' [password] to 'secret'
info: Loading answer for 'slapd/password2'
root@j-slapd:~# rm -rf /var/backups/*slapd* /var/backups/unknown*ldapdb
root@j-slapd:~# dpkg-reconfigure -fnoninteractive -pcritical slapd
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.5.11+dfsg-1~exp1ubuntu3... done.
  Moving old database directory to /var/backups:
  - directory unknown... done.
  Creating initial configuration... done.
  Creating LDAP directory... done.
root@j-slapd:~# pidof slapd
3570
root@j-slapd:~# ldapwhoami -x -D cn=admin,dc=example,dc=com -w secret
ldap_bind: Invalid credentials (49)
root@j-slapd:~# systemctl restart slapd
root@j-slapd:~# ldapwhoami -x -D cn=admin,dc=example,dc=com -w secret
dn:cn=admin,dc=example,dc=com
root@j-slapd:~#

With the packages from the release pocket, slapd is restarted after the dpkg-reconfigure and the test works.

I'm attaching a diff between the prelease and proposed maintainerscripts for slapd.