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

Re: [JunkMail] Re: libldap_r thread-safety problems

Emmanuel Dreyfus wrote:
Howard Chu <hyc@symas.com> wrote:

If your version of libldap_r is not using the re-entrant APIs then something went wrong during configure to prevent it from finding those
APIs. You should check your config.log...

Is there a simple way to instruct configure that it will find the re-entrant versions in libbind?

You might try reading the INSTALL file that is included with the source distribution. Section 2. Set the LIBS variable.

That aside, libldap_r is (intentionally) undocumented; you use it at your own risk. We've made it reliable enough for slapd's purposes. If
you're using it in any way differently from how slapd uses it, you're on
your own.

I use it through libcurl.

Which essentially means you have no idea how it is getting used.

As I said in my previous message - when we're forced to use a non-reentrant function, we protect it with a mutex. But that mutex only protects calls from our code. If there are other threads in other software calling the same libc functions, they will not be guarded by our mutexes, and so their behavior is indeterminate. This is one reason why we cannot guarantee support for libldap_r in arbitrary code.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
Chief Architect, OpenLDAP http://www.openldap.org/project/