From: Howard Chu Date: Thu, 3 Sep 2020 20:30:35 +0000 (+0100) Subject: ITS#9334 slapo-ppolicy re-fix ITS#9302 X-Git-Tag: OPENLDAP_REL_ENG_2_4_53~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af58686af31d2ed515ca63971b89ab919bd47efe;p=thirdparty%2Fopenldap.git ITS#9334 slapo-ppolicy re-fix ITS#9302 The mutex_lock was being skipped in the lockout case, but still calling mutex_unlock at the end. --- diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index e8ca467747..6e506b6ae3 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -995,12 +995,12 @@ ppolicy_bind_response( Operation *op, SlapReply *rs ) LDAPControl *ctrl = NULL; Entry *e; + ldap_pvt_thread_mutex_lock( &pi->pwdFailureTime_mutex ); /* If we already know it's locked, just get on with it */ if ( ppb->pErr != PP_noError ) { goto locked; } - ldap_pvt_thread_mutex_lock( &pi->pwdFailureTime_mutex ); op->o_bd->bd_info = (BackendInfo *)on->on_info; rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e ); op->o_bd->bd_info = bi;