mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-04 14:10:39 -05:00
make sure rwm_op_cleanup() is called also in case of bind (in partial fulfillment of ITS#5601)
This commit is contained in:
parent
6f00d98cfc
commit
e6446d3113
3 changed files with 34 additions and 1 deletions
|
|
@ -597,6 +597,27 @@ over_acl_attribute(
|
|||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
overlay_callback_after_backover( Operation *op, slap_callback *sc, int append )
|
||||
{
|
||||
slap_callback **scp;
|
||||
|
||||
for ( scp = &op->o_callback; *scp != NULL; scp = &(*scp)->sc_next ) {
|
||||
if ( (*scp)->sc_response == over_back_response ) {
|
||||
sc->sc_next = (*scp)->sc_next;
|
||||
(*scp)->sc_next = sc;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ( append ) {
|
||||
*scp = sc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* default return code in case of missing backend function
|
||||
* and overlay stack returning SLAP_CB_CONTINUE
|
||||
|
|
|
|||
|
|
@ -104,6 +104,15 @@ rwm_op_cleanup( Operation *op, SlapReply *rs )
|
|||
op->ore_reqdata = ros->ore_reqdata;
|
||||
}
|
||||
break;
|
||||
case LDAP_REQ_BIND:
|
||||
if ( rs->sr_err == LDAP_SUCCESS ) {
|
||||
#if 0
|
||||
/* too late, conn_mutex released */
|
||||
ber_bvreplace( &op->o_conn->c_ndn,
|
||||
&op->o_req_ndn );
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
op->o_callback = op->o_callback->sc_next;
|
||||
|
|
@ -354,7 +363,7 @@ rwm_op_bind( Operation *op, SlapReply *rs )
|
|||
return -1;
|
||||
}
|
||||
|
||||
op->o_callback = &roc->cb;
|
||||
overlay_callback_after_backover( op, &roc->cb, 1 );
|
||||
|
||||
return SLAP_CB_CONTINUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -473,6 +473,9 @@ LDAP_SLAPD_F (void) overlay_move LDAP_P((
|
|||
LDAP_SLAPD_F (void) overlay_remove LDAP_P((
|
||||
BackendDB *be, slap_overinst *on ));
|
||||
#endif /* SLAP_CONFIG_DELETE */
|
||||
LDAP_SLAPD_F (int) overlay_callback_after_backover LDAP_P((
|
||||
Operation *op, slap_callback *sc, int append ));
|
||||
|
||||
/*
|
||||
* bconfig.c
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue