ソースを参照

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
Rich Megginson 15 年 前
コミット
44e10f3486
1 ファイル変更5 行追加0 行削除
  1. 5 0
      ldap/servers/slapd/ldaputil.c

+ 5 - 0
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) {