Skip to content
Snippets Groups Projects
  • Dmitry Ivanov's avatar
    6131a2b5
    fix: Establish LDAP connections implicitly · 6131a2b5
    Dmitry Ivanov authored
    Unfortunately, Centos 7 provides only openssl 1.0.2 (at lest if we
    disregard epel), so we can't build the bundled libldap & libsasl2.
    "Okay", one might think, "we can link against the distro's libs".
    Well, turns out libldap 2.4, which is what we have to deal with in
    that case, doesn't have ldap_connect!
    
    Luckily, we don't have to connect explicitly. According to man pages:
    
    ```
    ldap_init() acts just like ldap_open(), but does not open a connection
    to the LDAP server.  The actual connection open will occur when the
    first operation is attempted.
    
    ldap_initialize()  acts  like ldap_init()...
    ```
    
    This is still true for libldap up to and including version 2.6.
    
    NO_DOC=picodata internal patch
    NO_CHANGELOG=picodata internal patch
    NO_TEST=picodata internal patch
    6131a2b5
    History
    fix: Establish LDAP connections implicitly
    Dmitry Ivanov authored
    Unfortunately, Centos 7 provides only openssl 1.0.2 (at lest if we
    disregard epel), so we can't build the bundled libldap & libsasl2.
    "Okay", one might think, "we can link against the distro's libs".
    Well, turns out libldap 2.4, which is what we have to deal with in
    that case, doesn't have ldap_connect!
    
    Luckily, we don't have to connect explicitly. According to man pages:
    
    ```
    ldap_init() acts just like ldap_open(), but does not open a connection
    to the LDAP server.  The actual connection open will occur when the
    first operation is attempted.
    
    ldap_initialize()  acts  like ldap_init()...
    ```
    
    This is still true for libldap up to and including version 2.6.
    
    NO_DOC=picodata internal patch
    NO_CHANGELOG=picodata internal patch
    NO_TEST=picodata internal patch