From: Timo Sirainen Date: Fri, 15 Aug 2014 10:58:47 +0000 (+0300) Subject: auth: Internal passdb failures were always failing the request even if another passdb... X-Git-Tag: 2.2.14.rc1~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e86708178df2b0bd00229eefc0f6e1ea5da3c460;p=thirdparty%2Fdovecot%2Fcore.git auth: Internal passdb failures were always failing the request even if another passdb succeeded later. --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index 847661f0de..adbc4198cc 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -651,14 +651,14 @@ auth_request_handle_passdb_callback(enum passdb_result *result, request->passdbs_seen_internal_failure = TRUE; } return FALSE; + } else if (request->passdb_success) { + /* either this or a previous passdb lookup succeeded. */ + *result = PASSDB_RESULT_OK; } else if (request->passdbs_seen_internal_failure) { /* last passdb lookup returned internal failure. it may have had the correct password, so return internal failure instead of plain failure. */ *result = PASSDB_RESULT_INTERNAL_FAILURE; - } else if (request->passdb_success) { - /* either this or a previous passdb lookup succeeded. */ - *result = PASSDB_RESULT_OK; } return TRUE; }