From: Kurt Zeilenga Date: Fri, 13 Aug 1999 06:09:48 +0000 (+0000) Subject: Force to LDAPv3 until BIND X-Git-Tag: TWEB_OL_BASE~226 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=34647dd8d7f9496de79711286e9982c194e9b6f5;p=openldap Force to LDAPv3 until BIND --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index f958862535..91633073fb 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -409,6 +409,9 @@ long connection_init( c->c_n_read = 0; c->c_n_write = 0; + /* assume LDAPv3 until bind */ + c->c_protocol = LDAP_VERSION3; + c->c_activitytime = c->c_starttime = slap_get_time(); ber_pvt_sb_set_desc( c->c_sb, s ); diff --git a/servers/slapd/modrdn.c b/servers/slapd/modrdn.c index 6bb7ed351e..5787516139 100644 --- a/servers/slapd/modrdn.c +++ b/servers/slapd/modrdn.c @@ -102,17 +102,7 @@ do_modrdn( /* Check for newSuperior parameter, if present scan it */ if ( ber_peek_tag( op->o_ber, &length ) == LDAP_TAG_NEWSUPERIOR ) { - - if ( op->o_protocol == 0 ) { - /* - * Promote to LDAPv3 - */ - ldap_pvt_thread_mutex_lock( &conn->c_mutex ); - conn->c_protocol = LDAP_VERSION3; - ldap_pvt_thread_mutex_unlock( &conn->c_mutex ); - op->o_protocol = LDAP_VERSION3; - - } else if ( op->o_protocol < LDAP_VERSION3 ) { + if ( op->o_protocol < LDAP_VERSION3 ) { /* Conection record indicates v2 but field * newSuperior is present: report error. */