]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/bind.c
trace illegal condition in backsql_strfcat
[openldap] / servers / slapd / bind.c
index 98884d4e43b7924c9385f852fc031d43e7742a02..e27873b8d1ac89c055b84a751c2f0e4fe568c987 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 ) {
@@ -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 );