dovecot-2.2: auth: Don't add original_user or auth_user to passd...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Mar 27 09:03:20 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/0540c2834f68
changeset: 18387:0540c2834f68
user: Timo Sirainen <tss at iki.fi>
date: Fri Mar 27 11:02:18 2015 +0200
description:
auth: Don't add original_user or auth_user to passdb reply if they already exist.
This allows passdb to override their values cleanly.
diffstat:
src/auth/auth-request-handler.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r acb0590787a0 -r 0540c2834f68 src/auth/auth-request-handler.c
--- a/src/auth/auth-request-handler.c Tue Mar 24 11:27:26 2015 +0200
+++ b/src/auth/auth-request-handler.c Fri Mar 27 11:02:18 2015 +0200
@@ -173,11 +173,13 @@
}
if (request->original_username != NULL &&
- null_strcmp(request->original_username, request->user) != 0) {
+ null_strcmp(request->original_username, request->user) != 0 &&
+ !auth_fields_exists(request->extra_fields, "original_user")) {
auth_str_add_keyvalue(dest, "original_user",
request->original_username);
}
- if (request->master_user != NULL)
+ if (request->master_user != NULL &&
+ !auth_fields_exists(request->extra_fields, "auth_user"))
auth_str_add_keyvalue(dest, "auth_user", request->master_user);
if (!request->auth_only &&
More information about the dovecot-cvs
mailing list