From: Timo Sirainen Date: Wed, 31 Mar 2010 16:18:01 +0000 (+0300) Subject: auth: If userdb lookup fails internally, don't cache the result. X-Git-Tag: 2.0.beta5~257 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff9da9c7c242ef711da7339014590fb0fac49f49;p=thirdparty%2Fdovecot%2Fcore.git auth: If userdb lookup fails internally, don't cache the result. --HG-- branch : HEAD --- diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index 4e033c525c..a370015b08 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -740,7 +740,9 @@ void auth_request_userdb_callback(enum userdb_result result, } } - if (result != USERDB_RESULT_INTERNAL_FAILURE) + if (request->userdb_lookup_failed) { + /* no caching */ + } else if (result != USERDB_RESULT_INTERNAL_FAILURE) auth_request_userdb_save_cache(request, result); else if (passdb_cache != NULL && userdb->cache_key != NULL) { /* lookup failed. if we're looking here only because the