[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
SDK: ldap_simple_bind gives Protocol error
Hi everyone,
I'm trying to work out why some sample code doesn't work against a
Centos 5 system (Centos being a RedHat Enterprise clone).
Client is Mac OS X 10.5, and server is Centos 5.3, OpenDLAP 2.3.43. The
sample code is from
http://docs.sun.com/source/816-5616-10/example.htm#13303.
(Am not using the Sun SDK, it was just a convenient place to find sample
code. If there are OpenLDAP sample code resources, a link is welcome.)
In particular the problem occurs at this piece of code:
/* Bind anonymously to the LDAP server. */
rc = ldap_simple_bind_s( ld, NULL, NULL );
if ( rc != LDAP_SUCCESS ) {
fprintf(stderr, "ldap_simple_bind_s: %s\n", ldap_err2string(rc));
return( 1 );
}
The resultant output is an error, namely;
'ldap_simple_bind_s: Protocol error'
In comparison, if I run the same code against a Gentoo Linux system that
also has OpenLDAP 2.3.43 the sample code works just fine.
If I do an ldapsearch from the Mac OS X client with the query
below, it succeeds.
ldapsearch -x -h remoteCentosldapsvr -b basedn
Can anyone suggest why the Centos 5 system is showing the protocol error?
Thanks
Regards
Stephen