apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: OpenLDAP's libldap and libldap_r
Date Sat, 24 Jan 2009 18:33:31 GMT
Joe Orton wrote:

> From reading the OpenLDAP source code the libldap_r build appears to 
> compile in a bunch of mutex locking calls around many/most of the ldap_* 
> interfaces.
> It's not obvious to me whether:
> a) this is because those calls are in fact manipulating process-global 
> state in some thread-unsafe way (not obvious how, if so), or
> b) this is enabling an additional API guarantee, that concurrent use of 
> a single LDAP * object from multiple threads is safe.
> I would assume any user of this apr-util API, hahaha sorry, let me start 
> again....  I would assume that httpd does not rely on the additional API 
> guarantee in (b).
> Since libldap and libldap_r seem to implement the same set of symbols 
> (and without symbol versioning) this kind of issue is a minefield for 
> downstream distributors, if apr-util/httpd link against libldap_r and 
> some perl LDAP foo links against libldap, everything goes boom.

This problem is wider then than just APR.

In that case, it looks like we need a build flag to explicitly choose 
whether we are building against ldap or ldap_r, and let the 
builder/distro decide which they want to support by default.


View raw message