]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/bind.c
Add dummy reference to lutil_uuidstr() for dynamically loaded back-bdb
[openldap] / servers / slapd / bind.c
index 98884d4e43b7924c9385f852fc031d43e7742a02..646b72f657ceec50b444242951c51e4818898a6e 100644 (file)
@@ -45,7 +45,7 @@ do_bind(
        int     rc = LDAP_SUCCESS;
        const char *text;
        struct berval cred = { 0, NULL };
-       Backend *be;
+       Backend *be = NULL;
 
 #ifdef NEW_LOGGING
        LDAP_LOG( OPERATION, ENTRY, "do_bind: conn %d\n", conn->c_connid, 0, 0 );
@@ -232,7 +232,6 @@ do_bind(
        }
 
        /* Set the bindop for the benefit of in-directory SASL lookups */
-       ldap_pvt_thread_mutex_lock( &conn->c_sasl_bindmutex );
        conn->c_sasl_bindop = op;
 
        if ( method == LDAP_AUTH_SASL ) {
@@ -278,7 +277,7 @@ do_bind(
 
                ldap_pvt_thread_mutex_lock( &conn->c_mutex );
                if ( conn->c_sasl_bind_in_progress ) {
-                       if((ber_bvcmp(&conn->c_sasl_bind_mech, &mech) != 0)) {
+                       if( !bvmatch( &conn->c_sasl_bind_mech, &mech ) ) {
                                /* mechanism changed between bind steps */
                                slap_sasl_reset(conn);
                        }
@@ -311,7 +310,7 @@ do_bind(
                        }
 
                        if( conn->c_dn.bv_len != 0 ) {
-                               ber_len_t max = sockbuf_max_incoming;
+                               ber_len_t max = sockbuf_max_incoming_auth;
                                ber_sockbuf_ctrl( conn->c_sb,
                                        LBER_SB_OPT_SET_MAX_INCOMING, &max );
                        }
@@ -542,7 +541,7 @@ do_bind(
                        ndn.bv_len = 0;
 
                        if( conn->c_dn.bv_len != 0 ) {
-                               ber_len_t max = sockbuf_max_incoming;
+                               ber_len_t max = sockbuf_max_incoming_auth;
                                ber_sockbuf_ctrl( conn->c_sb,
                                        LBER_SB_OPT_SET_MAX_INCOMING, &max );
                        }
@@ -575,7 +574,6 @@ do_bind(
 
 cleanup:
        conn->c_sasl_bindop = NULL;
-       ldap_pvt_thread_mutex_unlock( &conn->c_sasl_bindmutex );
 
        if( pdn.bv_val != NULL ) {
                free( pdn.bv_val );