]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Internal passdb failures were always failing the request even if another passdb...
authorTimo Sirainen <tss@iki.fi>
Fri, 15 Aug 2014 10:58:47 +0000 (13:58 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 15 Aug 2014 10:58:47 +0000 (13:58 +0300)
src/auth/auth-request.c

index 847661f0de5e2d203e75318cbc44931f9d7f1934..adbc4198cc41b97facd609447bdda445972e4c93 100644 (file)
@@ -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;
 }