Skip to content

Commit

Permalink
auth: Use MECH subsystem when logging error about skipping all passwo…
Browse files Browse the repository at this point in the history
…rd databases

Otherwise it will assert-crash because all password databases were skipped.
  • Loading branch information
cmouse committed Apr 28, 2017
1 parent fee117f commit 2b7fbe3
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/auth/auth-request.c
Expand Up @@ -1027,10 +1027,8 @@ void auth_request_verify_plain_continue(struct auth_request *request,
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);
auth_request_log_error(request, AUTH_SUBSYS_MECH,
"All password databases were skipped");
callback(PASSDB_RESULT_INTERNAL_FAILURE, request);
return;
}
Expand Down Expand Up @@ -1208,10 +1206,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_DB,
"All password databases were skipped for mechanism '%s'",
request->mech == NULL ? "<empty>"
: request->mech->mech_name);
auth_request_log_error(request, AUTH_SUBSYS_MECH,
"All password databases were skipped");
callback(PASSDB_RESULT_INTERNAL_FAILURE, NULL, 0, request);
return;
}
Expand Down

0 comments on commit 2b7fbe3

Please sign in to comment.