]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9334 slapo-ppolicy re-fix ITS#9302
authorHoward Chu <hyc@openldap.org>
Thu, 3 Sep 2020 20:30:35 +0000 (21:30 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 3 Sep 2020 21:46:16 +0000 (21:46 +0000)
The mutex_lock was being skipped in the lockout case,
but still calling mutex_unlock at the end.

servers/slapd/overlays/ppolicy.c

index e8ca467747219da283566d4cd7536f6e782127c8..6e506b6ae3ba0cd3481d912218c5032ff711023f 100644 (file)
@@ -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;