mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
fix cached connection taint in case of timeout
This commit is contained in:
parent
9b5dbf9e35
commit
ecc28ff57c
1 changed files with 15 additions and 0 deletions
|
|
@ -1619,8 +1619,23 @@ retry:;
|
|||
if ( sendok & LDAP_BACK_BINDING ) {
|
||||
ldap_unbind_ext( lc->lc_ld, NULL, NULL );
|
||||
lc->lc_ld = NULL;
|
||||
|
||||
/* let it be used, but taint/delete it so that
|
||||
* no-one else can look it up any further */
|
||||
ldap_pvt_thread_mutex_lock( &li->li_conninfo.lai_mutex );
|
||||
|
||||
#if LDAP_BACK_PRINT_CONNTREE > 0
|
||||
ldap_back_print_conntree( li, ">>> ldap_back_getconn(timeout)" );
|
||||
#endif /* LDAP_BACK_PRINT_CONNTREE */
|
||||
|
||||
(void)ldap_back_conn_delete( li, lc );
|
||||
LDAP_BACK_CONN_TAINTED_SET( lc );
|
||||
|
||||
#if LDAP_BACK_PRINT_CONNTREE > 0
|
||||
ldap_back_print_conntree( li, "<<< ldap_back_getconn(timeout)" );
|
||||
#endif /* LDAP_BACK_PRINT_CONNTREE */
|
||||
ldap_pvt_thread_mutex_unlock( &li->li_conninfo.lai_mutex );
|
||||
|
||||
} else {
|
||||
(void)ldap_back_cancel( lc, op, rs, msgid, sendok );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue