dovecot-1.1: auth worker processes shouldn't duplicate the auth ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jan 8 18:41:37 EET 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/30207243a4f4
changeset: 8075:30207243a4f4
user: Timo Sirainen <tss at iki.fi>
date: Thu Jan 08 11:41:30 2009 -0500
description:
auth worker processes shouldn't duplicate the auth cache.
diffstat:
2 files changed, 8 insertions(+), 4 deletions(-)
src/auth/auth-request.c | 8 +++++---
src/auth/auth.c | 4 +++-
diffs (32 lines):
diff -r e76f93b48187 -r 30207243a4f4 src/auth/auth-request.c
--- 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
@@ -1086,9 +1086,11 @@ void auth_request_set_field(struct auth_
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);
diff -r e76f93b48187 -r 30207243a4f4 src/auth/auth.c
--- a/src/auth/auth.c Thu Jan 08 11:34:22 2009 -0500
+++ b/src/auth/auth.c Thu Jan 08 11:41:30 2009 -0500
@@ -199,7 +199,9 @@ void auth_init(struct auth *auth)
passdb_init(passdb);
for (userdb = auth->userdbs; userdb != NULL; userdb = userdb->next)
userdb_init(userdb);
- passdb_cache_init();
+ /* caching is handled only by the main auth process */
+ if (!worker)
+ passdb_cache_init();
auth->mech_handshake = str_new(auth->pool, 512);
More information about the dovecot-cvs
mailing list