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

Re: Supporting different LDAP version protocols?



> Hey all,
>
> I have slapd 2.1.25 running locally on my WinXP box, and I've written
> this little dummy client to use the LDAP API calls to bind, and search.
>
> The problem I'm running into is that when I do an init call, it works
> but the protocol value on the returned LDAP* is 2. Then when I try to
> bind, I get a "Protocol error". If I change that value to 3, then
> binding works fine and I'm up and running.

This is weird, but the client library defaults to v2
(not for long, I hope), while the server defaults to
v3; so you need to explicitly chenage version __right
after__ init (use ldap_initialize(), BTW).

>
> So, I really have two questions.
>
> 1. Why isn't the init call setting the protocol to 3, which is what my
> server is obviously expecting? Is it something wrong with my server
> setup, or is this always the default for the init? If it's the default,
> then is there an API call to ask a LDAP server what protocol it
> supports? Some clients I've tried let you specify the version when you
> setup the server connection, but others (such as Outlook) don't so they
> must be able to figure it out on thier own somehow (or else they just
> try both).

Nothing wrong, see above

>
> 2. How do I setup my server to support version 2 binding? I found a post
> that mentioned putting "allow v2_bind" in the .conf file, but slapd
> tells me that "v2_bind" is not a recognized feature in "allow
> <features>".

I don't want to diminish the value of postings googled
out of the internet, but in general they should be viewed
as __less__ authoritative than official docs.  If you take
the time to type "man slad.conf" and read it, you'll find
that the switch is called "bind_v2".  I'm sure this will
take less than googling 'round until you find the solution.

p.

>
>
> Any help would be greatly appreciated.
>
> Thanks,
>
> mharp


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it