[Date Prev][Date Next] [Chronological] [Thread] [Top]

back-ldap rejects multiple URIs (ITS#3253)

Full_Name: Howard Chu
Version: HEAD,2.2.14
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (
Submitted by: hyc

If you try to configure multiple target servers in back-ldap using e.g.
    uri "ldap://server1.foo.bar ldap://server2.foo.bar";
the uri is rejected because back-ldap calls ldap_url_parse_ext which expects a
single URL, not a list. The parsed result is saved in li->lud but aside from
validation in config.c it is never used anywhere else. (back-ldap's Bind
function only uses the original unparsed URI string.)

I believe the fix for this is to remove lud from the ldapinfo struct, use
ldap_url_parselist with a temporary pointer and immediately free the result.