cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Ldap URL and binary entries

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 2 Jun 2005 12:59:01 +0200 (CEST)

On Wed, 1 Jun 2005, Jean-Marc Desperrier wrote:

> SAFE-STRING = [SAFE-INIT-CHAR *SAFE-CHAR]

Heh, ok, now I understand your hesitation...

>> BTW, your patch makes the code not compile for me anymore, since I have no
>> 'struct berval' anywhere...
>
> In my setting, it came from this include line at the top of ldap.c

...

> OpenLDAP for Linux/OS X, etc. has it with :
> #include <lber.h>

> I don't think the size of the first element is guaranteed to be the same on
> all platforms, so it's better to get it from the correct include than
> redefining it.

Yes, but... eh, this is the point where you'll start thinking my comments are
getting really annoying:

The current source code builds fine without any LDAP headers available (on
*nix)! I personally don't have any OpenLDAP things installed on any of the
hosts I build (lib)curl on...

So, in order to apply your patch, we need to make sure that we can include the
lber.h LDAP header, and then we need to make sure it exists and then we need
to extend the configure check and we then disable the ability to run-time
detect and use LDAP even when built on a system without LDAP.

While I have no problems with that approach, I would then rather do the full
jump and skip the whole run-time loading of the symbols and instead make use
of the functions the "ordinary" way and link with the libs etc. It would also
solve the nasty issue we have with possible ldap API incompabilities.

>> Can't we make the type of output respect CURLOPT_TRANSFERTEXT instead?
>
> Yes, this is a good idea except that I understand CURLOPT_TRANSFERTEXT
> defaults to binary, and here we really want to default to ldif.

Ah, right... I wonder if we could simply switch the default for LDAP. It feels
really bad to add an option with basically the same meaning, only a reversed
default value!

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-06-02