dovecot-2.2: auth: If userdb lookup was found from auth cache, d...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 7 18:25:07 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/b7f7ad2bc4d0
changeset: 19110:b7f7ad2bc4d0
user: Timo Sirainen <tss at iki.fi>
date: Mon Sep 07 21:24:01 2015 +0300
description:
auth: If userdb lookup was found from auth cache, don't clear the earlier userdb fields.
diffstat:
src/auth/auth-request.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (18 lines):
diff -r f3ed414944b8 -r b7f7ad2bc4d0 src/auth/auth-request.c
--- a/src/auth/auth-request.c Mon Sep 07 21:02:51 2015 +0300
+++ b/src/auth/auth-request.c Mon Sep 07 21:24:01 2015 +0300
@@ -1024,7 +1024,13 @@
return TRUE;
}
- request->userdb_reply = auth_fields_init(request->pool);
+ /* We want to preserve any userdb fields set by the earlier passdb
+ lookup, so initialize userdb_reply only if it doesn't exist.
+ Don't use auth_request_init_userdb_reply(), because the entire
+ userdb part of the result comes from the cache so we don't want to
+ initialize it with default_fields. */
+ if (request->userdb_reply == NULL)
+ request->userdb_reply = auth_fields_init(request->pool);
auth_request_userdb_import(request, value);
*result_r = USERDB_RESULT_OK;
return TRUE;
More information about the dovecot-cvs
mailing list