]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: If userdb lookup fails internally, don't cache the result.
authorTimo Sirainen <tss@iki.fi>
Wed, 31 Mar 2010 16:18:01 +0000 (19:18 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 31 Mar 2010 16:18:01 +0000 (19:18 +0300)
--HG--
branch : HEAD

src/auth/auth-request.c

index 4e033c525cefc33df4adccb43dbc33d68551d5ab..a370015b083266b19605ae37d2627a5f3a7495cd 100644 (file)
@@ -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