Skip to content

Commit

Permalink
auth: Fix crash on passdb lookup when all passdbs were skipped
Browse files Browse the repository at this point in the history
Finishes the fix in 614f5b6

Fixes:
auth: Panic: file auth-request.c: line 2493 (get_log_prefix): assertion failed: (auth_request->mech != NULL)
  • Loading branch information
sirainen authored and villesavolainen committed May 30, 2017
1 parent 1fb2191 commit 7b98e00
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/auth/auth-request.c
Expand Up @@ -1062,7 +1062,8 @@ void auth_request_verify_plain_continue(struct auth_request *request,
request->passdb = passdb;

if (passdb == NULL) {
auth_request_log_error(request, AUTH_SUBSYS_MECH,
auth_request_log_error(request,
request->mech != NULL ? AUTH_SUBSYS_MECH : "none",
"All password databases were skipped");
callback(PASSDB_RESULT_INTERNAL_FAILURE, request);
return;
Expand Down Expand Up @@ -1229,7 +1230,8 @@ void auth_request_lookup_credentials_policy_continue(struct auth_request *reques
request->passdb = passdb;

if (passdb == NULL) {
auth_request_log_error(request, AUTH_SUBSYS_MECH,
auth_request_log_error(request,
request->mech != NULL ? AUTH_SUBSYS_MECH : "none",
"All password databases were skipped");
callback(PASSDB_RESULT_INTERNAL_FAILURE, NULL, 0, request);
return;
Expand Down

0 comments on commit 7b98e00

Please sign in to comment.