Package: openldap2 Severity: normal Tags: patch Although ntlm.c is added to the sources and (partially) included in the build process, the task is only partially done. Thus ntlm.lo is not linked into libldap.so and its functions can therefore not be used.
The attached patch fixes it: it completes the inclusion in the build process and makes ntlm.c compile by backporting a macro from OL 2.2 and changing the number of arguments a function is called with. Have fun Peter -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.10-1-k7 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
# complete inclusion of ntlm.c into libldap.so --- libraries/libldap/Makefile.in +++ libraries/libldap/Makefile.in @@ -20,7 +20,7 @@ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \ controls.lo messages.lo references.lo extended.lo cyrus.lo \ modify.lo add.lo modrdn.lo delete.lo abandon.lo \ - sasl.lo sbind.lo kbind.lo unbind.lo cancel.lo cache.lo \ + sasl.lo sbind.lo kbind.lo ntlm.lo unbind.lo cancel.lo cache.lo \ filter.lo free.lo sort.lo passwd.lo whoami.lo \ getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \ request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \ --- libraries/libldap/ldap-int.h +++ libraries/libldap/ldap-int.h @@ -322,6 +322,15 @@ #endif #endif +#ifdef LDAP_R_COMPILE +#define LDAP_NEXT_MSGID(ld, id) \ + ldap_pvt_thread_mutex_lock( &(ld)->ld_req_mutex ); \ + id = ++(ld)->ld_msgid; \ + ldap_pvt_thread_mutex_unlock( &(ld)->ld_req_mutex ) +#else +#define LDAP_NEXT_MSGID(ld, id) id = ++(ld)->ld_msgid +#endif + /* * in init.c */ --- libraries/libldap/ntlm.c +++ libraries/libldap/ntlm.c @@ -70,7 +70,7 @@ } /* send the message */ - *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id ); + *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber ); if(*msgidp < 0) return ld->ld_errno;