Debug( LDAP_DEBUG_TRACE, "do_add\n", 0, 0, 0 );
- if( op->o_bind_in_progress ) {
- Debug( LDAP_DEBUG_ANY, "do_add: SASL bind in progress.\n", 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_SASL_BIND_IN_PROGRESS, NULL,
- "SASL bind in progress", NULL, NULL );
- return LDAP_SASL_BIND_IN_PROGRESS;
- }
-
/*
* Parse the add request. It looks like this:
*
Debug( LDAP_DEBUG_TRACE, "do_compare\n", 0, 0, 0 );
- if( op->o_bind_in_progress ) {
- Debug( LDAP_DEBUG_ANY, "do_compare: SASL bind in progress.\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_SASL_BIND_IN_PROGRESS,
- NULL, "SASL bind in progress", NULL, NULL );
- return LDAP_SASL_BIND_IN_PROGRESS;
- }
-
/*
* Parse the compare request. It looks like this:
*
num_ops_initiated++;
ldap_pvt_thread_mutex_unlock( &num_ops_mutex );
+ if( conn->c_bind_in_progress == 1 && tag != LDAP_REQ_BIND ) {
+ Debug( LDAP_DEBUG_ANY,
+ "connection_operation: SASL bind in progress.\n",
+ 0, 0, 0 );
+ send_ldap_result( conn, arg->co_op, LDAP_OPERATIONS_ERROR,
+ NULL, "SASL bind in progress", NULL, NULL );
+ rc = LDAP_OPERATIONS_ERROR;
+ goto operations_error;
+ }
+
switch ( tag ) {
case LDAP_REQ_BIND:
rc = do_bind( conn, arg->co_op );
if( rc == SLAPD_DISCONNECT ) tag = LBER_ERROR;
+operations_error:
ldap_pvt_thread_mutex_lock( &num_ops_mutex );
num_ops_completed++;
ldap_pvt_thread_mutex_unlock( &num_ops_mutex );
arg->co_conn = conn;
arg->co_op = op;
- arg->co_op->o_bind_in_progress = conn->c_bind_in_progress;
-
arg->co_op->o_dn = ch_strdup( tmpdn != NULL ? tmpdn : "" );
arg->co_op->o_ndn = ch_strdup( arg->co_op->o_dn );
(void) dn_normalize( arg->co_op->o_ndn );
Debug( LDAP_DEBUG_TRACE, "do_delete\n", 0, 0, 0 );
- if( op->o_bind_in_progress ) {
- Debug( LDAP_DEBUG_ANY, "do_delete: SASL bind in progress.\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_SASL_BIND_IN_PROGRESS,
- NULL, "SASL bind in progress", NULL, NULL );
- return LDAP_SASL_BIND_IN_PROGRESS;
- }
-
/*
* Parse the delete request. It looks like this:
*
Debug( LDAP_DEBUG_TRACE, "do_modify\n", 0, 0, 0 );
- if( op->o_bind_in_progress ) {
- Debug( LDAP_DEBUG_ANY, "do_modify: SASL bind in progress.\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_SASL_BIND_IN_PROGRESS,
- NULL, "SASL bind in progress", NULL, NULL );
- return LDAP_SASL_BIND_IN_PROGRESS;
- }
-
/*
* Parse the modify request. It looks like this:
*
Debug( LDAP_DEBUG_TRACE, "do_modrdn\n", 0, 0, 0 );
- if( op->o_bind_in_progress ) {
- Debug( LDAP_DEBUG_ANY, "do_modrdn: SASL bind in progress.\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_SASL_BIND_IN_PROGRESS,
- NULL, "SASL bind in progress", NULL, NULL );
- return LDAP_SASL_BIND_IN_PROGRESS;
- }
-
/*
* Parse the modrdn request. It looks like this:
*
Debug( LDAP_DEBUG_TRACE, "do_search\n", 0, 0, 0 );
- if( op->o_bind_in_progress ) {
- Debug( LDAP_DEBUG_ANY, "do_search: SASL bind in progress.\n",
- 0, 0, 0 );
- send_ldap_result( conn, op, LDAP_SASL_BIND_IN_PROGRESS,
- NULL, "SASL bind in progress", NULL, NULL );
- return LDAP_SASL_BIND_IN_PROGRESS;
- }
-
/*
* Parse the search request. It looks like this:
*
ber_tag_t o_tag; /* tag of the request */
time_t o_time; /* time op was initiated */
- int o_bind_in_progress; /* multi-step bind in progress */
#ifdef SLAP_AUTHZID
/* should only be used for reporting purposes */
char *o_authc_dn; /* authentication DN */