summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-09-03 11:27:39 -0600
committerRich Megginson <rmeggins@redhat.com>2010-09-03 14:15:50 -0600
commit44e10f3486e46d4d940dc5bad85aaf786805eb06 (patch)
tree093066e92edab237342a7609e0ac1ec3f0ad00cf
parent644b5531bc27c0813298c79c3f1affd50dc40dbf (diff)
downloadds-44e10f3486e46d4d940dc5bad85aaf786805eb06.tar.gz
ds-44e10f3486e46d4d940dc5bad85aaf786805eb06.tar.xz
ds-44e10f3486e46d4d940dc5bad85aaf786805eb06.zip
Have to explicitly set protocol version to 3
openldap requires that the protocol version be explicitly set to 3 mozldap defaults to 3, but it doesn't hurt to set it again
-rw-r--r--ldap/servers/slapd/ldaputil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ldap/servers/slapd/ldaputil.c b/ldap/servers/slapd/ldaputil.c
index 77b08cdd..3d65efc6 100644
--- a/ldap/servers/slapd/ldaputil.c
+++ b/ldap/servers/slapd/ldaputil.c
@@ -593,6 +593,7 @@ slapi_ldap_init_ext(
LDAP *ld = NULL;
int rc = 0;
int secureurl = 0;
+ int ldap_version3 = LDAP_VERSION3;
/* We need to provide a sasl path used for client connections, especially
if the server is not set up to be a sasl server - since mozldap provides
@@ -723,6 +724,10 @@ slapi_ldap_init_ext(
ld = prldap_init(hostname, port, shared);
}
#endif /* !USE_OPENLDAP */
+
+ /* must explicitly set version to 3 */
+ ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &ldap_version3);
+
/* Update snmp interaction table */
if (hostname) {
if (ld == NULL) {