[Bug 286063] Re: [SRU] slapd package cannot be installed when using bash as the default shell

Mathias Gug mathiaz at ubuntu.com
Wed Nov 5 01:22:52 GMT 2008


** Summary changed:

- slapd package cannot be installed when using bash as the default shell
+ [SRU] slapd package cannot be installed when using bash as the default shell

** Description changed:

  In Intrepid I'd like to install slapd package and the preinst script gives an error message:
  /var/lib/dpkg/tmp.ci/config: line 944: local: can only be used in a function
  dpkg: error processing /var/cache/apt/archives/slapd_2.4.11-0ubuntu5_i386.deb (--unpack):
   subprocess pre-installation script returned error exit status 1
  Errors were encountered while processing:
   /var/cache/apt/archives/slapd_2.4.11-0ubuntu5_i386.deb
+ 
+ SRU PROCESS
+ =========
+ 
+ IMPACT
+ ---------
+ 
+ If a system is using /bin/bash as the default sh shell, slapd config script fails during an upgrade from hardy to intrepid.
+ This is due to the usage of a local statement outside of a function. dash doesn't fail while bash fails.
+ 
+ RESOLUTION
+ ----------------
+ 
+ Remove the local statement in the slapd config script.
+ 
+ PATCH
+ --------
+ 
+ diff -u openldap-2.4.11/debian/slapd.config openldap-2.4.11/debian/slapd.config
+ --- openldap-2.4.11/debian/slapd.config
+ +++ openldap-2.4.11/debian/slapd.config
+ @@ -185,7 +185,6 @@
+                         db_go || true
+  
+                         # Make sure the passwords match
+ -                       local pass1 pass2
+                         db_get slapd/cfgpassword1
+                         pass1="$RET"
+                         db_get slapd/cfgpassword2
+ 
+ TESTCASE
+ -------------
+ 
+ Install slapd in hardy.
+ 
+ Change the default shell to bash:
+ 
+ $ sudo ln -sf /bin/bash /bin/sh
+ 
+ Do an upgrade - enter a new password for the cn=config backend.
+ 
+ Expected Result:
+ The upgrade completes and upon reboot slapd is running with a cn=config backend:
+ 
+ $  ldapsearch -b "cn=config" -D "cn=admin,cn=config" -x -W
+ 
+ The command should return a long list of ldap attributes in ldif format.
+ 
+ Potential regression
+ --------------------------
+ None.

-- 
[SRU] slapd package cannot be installed when using bash as the default shell
https://bugs.launchpad.net/bugs/286063
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openldap in ubuntu.



More information about the Ubuntu-server-bugs mailing list