Skip to content

Commit

Permalink
Merge pull request #62 from jmk-foofus/54-thread-perallelize-bug
Browse files Browse the repository at this point in the history
If another thread tested the last password for a user and selected th…
  • Loading branch information
jmk-foofus authored Feb 18, 2024
2 parents 4e9be7e + 7c272fb commit 5676a0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/medusa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,11 @@ int getNextNormalCredSet(sLogin *_psLogin, sCredentialSet *_psCredSet)
{
_psLogin->psUser = NULL;
}
/* if another thread has already selected the next user, process that user */
else if ((_psLogin->psServer->psHost->psUserCurrent->iPassStatus != PL_DONE) && (_psLogin->psServer->psHost->psUserCurrent->iPassStatus != PASS_AUDIT_COMPLETE))
{
_psLogin->psUser = _psLogin->psServer->psHost->psUserCurrent;
}
else
{
_psLogin->psUser = _psLogin->psServer->psHost->psUserCurrent->psUserNext;
Expand Down

0 comments on commit 5676a0b

Please sign in to comment.