From: Timo Sirainen Date: Tue, 30 May 2017 08:30:10 +0000 (+0300) Subject: auth: Fix crash on passdb lookup when all passdbs were skipped X-Git-Tag: 2.3.0.rc1~1544 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8df38b03aa84198e9e78c7ccfe63fcb445fa8058;p=thirdparty%2Fdovecot%2Fcore.git auth: Fix crash on passdb lookup when all passdbs were skipped Finishes the fix in 614f5b6febaf3c825f9200ab3b62d9d047197b0e Fixes: auth: Panic: file auth-request.c: line 2493 (get_log_prefix): assertion failed: (auth_request->mech != NULL) --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index 6591cd9b42..b850fe0917 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -1077,7 +1077,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; @@ -1256,7 +1257,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;