Skip to content

Commit

Permalink
auth: Apply skips to first passdb
Browse files Browse the repository at this point in the history
This is required to apply filters to first
passdb, so that mechanism filters can be
applied.
  • Loading branch information
cmouse committed Mar 6, 2017
1 parent 665a208 commit 3f97702
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/auth/auth-request.c
Expand Up @@ -987,7 +987,21 @@ void auth_request_verify_plain_continue(struct auth_request *request,
return;
}

passdb = request->passdb;
passdb = request->passdb;

while (passdb != NULL && auth_request_want_skip_passdb(request, passdb))
passdb = passdb->next;

request->passdb = passdb;

if (passdb == NULL) {
auth_request_log_error(request, AUTH_SUBSYS_DB,
"All password databases were skipped for mechanism '%s'",
request->mech == NULL ? "<empty>"
: request->mech->mech_name);
callback(PASSDB_RESULT_INTERNAL_FAILURE, request);
return;
}

request->private_callback.verify_plain = callback;

Expand Down

0 comments on commit 3f97702

Please sign in to comment.