tag 375097 + patch thanks Le ven 23 juin 2006 11:46, Pierre Habouzit a écrit : > Package: libnss-ldap > Version: 251-1 > Severity: grave > Justification: renders package unusable > > > in previous versions, libnss-ldap asked for an host that was the > ldap server. I gave (like you can see in that body) and IP for it. > > sadly, now you use the shared/ldapns/ldap-server for the *uri* > libnss-ldap.conf setting, and an IP is not a valid url. it has to be > ldap://aaa.bbb.ccc.ddd/ instead. quoting the "uri" setting and > reinstating the "host" one, made it work again. > > You should in your configuration script, detect if the given > setting is: > (1) an IP > (2) a FQDN > (3) sth that starts with ldaps?:// > > if (1) or (2) use the `host' setting, if (3) use the uri setting > else fail loudly.
I propose the attached untested patch to achieve that: it uses the setting as URI IFF it starts with ldaps?:// -- ·O· Pierre Habouzit ··O [EMAIL PROTECTED] OOO http://www.madism.org
--- libnss-ldap.postinst.orig 2006-06-23 12:41:30.000000000 +0200 +++ libnss-ldap.postinst 2006-06-23 12:47:09.000000000 +0200 @@ -93,8 +93,13 @@ fi db_get shared/ldapns/ldap-server - disable_param host - change_value uri "$RET" + if echo $RET | egrep -q '^ldaps?://'; then + disable_param host + change_value uri "$RET" + else + disable_param uri + change_value host "$RET" + fi db_get shared/ldapns/base-dn change_value base "$RET"
pgpIuVfULrrJe.pgp
Description: PGP signature