cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURL and LDAP

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 31 May 2001 08:29:16 +0200 (MET DST)

On Wed, 30 May 2001, Jean-Christophe Dubois wrote:

> I am new to CURL (7.7.3) and I tried to access and LDAP server (openldap
> 2.0.8) using the libcurl library. I was trying to retrieve a big chunk
> of data (1.6MB) and using the tools that come with openldap (ldapsearch)
> I have no problem doing it.

Ouch. I have a really guilty conscience about the LDAP parts. They've been
notoriously badly maintained and not at all that well tested and streamlined
as large parts of the rest of the code.

I will need help from people to get that in perfect order and shaped up. I
have been thinking about dumping LDAP completely, but as can be seen, that
has not happened (yet).

> 1) Build time: I am compiling on Solaris 2.6 using GNU 2.95.2, openssl
> 0.9.6 and openldap 2.0.8. Using "configure" I didn't found a way to
> enable HAVE_DLOPEN or HAVE_LIBDL in config .h. dlopen is detected by
> configure but it is not then "defined" in config .h. I worked around it
> (I am not a "configure" expert) by defining these 2 flags in CFLAGS
> before running "configure". Is there a "better" way to do it (there must
> be one).

Gosh. I have no explanation to this. The valid fix is to add 'dlopen' to the
checks in configure.in.

> The backtrace is as follow Which seems to be strange as I would expect it
> to be in some Curl_ldap_xxx function:

 [snip]

> Any clue?

Not right now. No. Could you rebuild libcurl with -g and see if that makes
the stack strace a little more detailed and thus offer us some more clues?

As a matter of fact, I don't even have openldap installed on my develop
machine right now...

> 3) Code comment/question: For LDAP, libcurl is loading (dlopen) and
> unloading (dlclose) the LDAP library for each call. It seems that it is a
> bit inneficient if you plan to access mainly LDAP using CURL. Why is it
> this "special" way with LDAP?

There's no particular reason, it just ended up getting implemented like that
by the person who brought LDAP support.

I find it nice to dlopen() the library instead of having a link-time
dependency.

I would greatly appriciate any improvements you can provide...

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-05-31