diff src/auth/auth-request.c @ 8599:812a977d7c1a HEAD

auth worker processes shouldn't duplicate the auth cache.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 Jan 2009 11:41:30 -0500
parents 9f885dbd8157
children 20345491824c 9d0037a997f4
line wrap: on
line diff
--- a/src/auth/auth-request.c	Thu Jan 08 11:34:22 2009 -0500
+++ b/src/auth/auth-request.c	Thu Jan 08 11:41:30 2009 -0500
@@ -1055,9 +1055,11 @@
 		return;
 	}
 
-	if (passdb_cache != NULL &&
-	    request->passdb->passdb->cache_key != NULL) {
-		/* we'll need to get this field stored into cache */
+	if ((passdb_cache != NULL &&
+	     request->passdb->passdb->cache_key != NULL) || worker) {
+		/* we'll need to get this field stored into cache,
+		   or we're a worker and we'll need to send this to the main
+		   auth process that can store it in the cache. */
 		if (request->extra_cache_fields == NULL) {
 			request->extra_cache_fields =
 				auth_stream_reply_init(request->pool);