[Date Prev][Date Next]
Re: "Protocol error" on ldap_simple_bind_s
On Sunday 11 September 2005 16:05, Pupeno wrote:Nothing. You need to use ldap_set_option(3) to select the protocol
version. I suggest you look into the code of ldap tools
(clients/tools/*.c) and significantly in clients/tools/common.c to see
how they deal with setting the requested protocol version. The protocol
can either be explicitly selected by using the "-P" switch, or
implicitly selected by selecting features that are LDAPv3 only, like
SASL bind or LDAP controls.
Hello,Yes, it is that:
I am making an LDAP client using OpenLDAP's libldap, I run ldap_open,
which returns a pointer and when I run ldap_simple_bind_s, I get that
error: "Protocol error".
I remember reading somewhere that the API defaulted to LDAPv2 while the
server is running LDAPv3, but I can't find that anymore.
Any help as to what is going wrong is appretiated.
Sep 11 16:31:08 movlab slapd: conn=6 fd=13 ACCEPT from
Sep 11 16:31:08 movlab slapd: conn=6 op=0 BIND
Sep 11 16:31:08 movlab slapd: conn=6 op=0 RESULT tag=97 err=2
text=historical protocol version requested, use LDAPv3 instead
consulting man ldap I see: "A session handle is created using
ldap_initialize(3) and set the protocol version to 3 by calling
ldap_initialize is now replaced by ldap_init or the better ldap_open, but I
can't find what replaces ldap_set_option, does anybody know that ?
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497