From: Timo Sirainen Date: Fri, 24 Oct 2014 23:42:47 +0000 (+0300) Subject: auth: Some unsuccessful passdb lookups weren't returned as failures to passdb lookups. X-Git-Tag: 2.2.15~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbdd683dd23641dca779bffdf22c089b57fe5066;p=thirdparty%2Fdovecot%2Fcore.git auth: Some unsuccessful passdb lookups weren't returned as failures to passdb lookups. These lookups were only being done internally, so it usually didn't matter. Also this only affected things like allow_nets checking and some non-common passdb { result_* } settings. --- diff --git a/src/auth/auth-master-connection.c b/src/auth/auth-master-connection.c index a592b2a6bb..b3abd1040c 100644 --- a/src/auth/auth-master-connection.c +++ b/src/auth/auth-master-connection.c @@ -326,6 +326,10 @@ static void pass_callback_finish(struct auth_request *auth_request, str = t_str_new(128); switch (result) { case PASSDB_RESULT_OK: + if (auth_request->failed || !auth_request->passdb_success) { + str_printfa(str, "FAIL\t%u", auth_request->id); + break; + } str_printfa(str, "PASS\t%u\tuser=", auth_request->id); str_append_tabescaped(str, auth_request->user); if (!auth_fields_is_empty(auth_request->extra_fields)) {