dovecot-2.1: auth: If master_user is specified by userdb, don't ...

dovecot at dovecot.org dovecot at dovecot.org
Fri Jan 6 13:50:29 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/f0d11bd4e5f5
changeset: 13892:f0d11bd4e5f5
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jan 06 13:50:07 2012 +0200
description:
auth: If master_user is specified by userdb, don't add another one to reply.
The one specified by userdb should have overridden the other one though.

diffstat:

 src/auth/auth-request-handler.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 380b0667e0a5 -r f0d11bd4e5f5 src/auth/auth-request-handler.c
--- a/src/auth/auth-request-handler.c	Fri Jan 06 13:26:30 2012 +0200
+++ b/src/auth/auth-request-handler.c	Fri Jan 06 13:50:07 2012 +0200
@@ -597,7 +597,9 @@
 	case USERDB_RESULT_OK:
 		auth_stream_reply_add(reply, "USER", NULL);
 		auth_stream_reply_add(reply, NULL, dec2str(request->id));
-		if (request->master_user != NULL) {
+		if (request->master_user != NULL &&
+		    auth_stream_reply_find(request->userdb_reply,
+					   "master_user") == NULL) {
 			auth_stream_reply_add(request->userdb_reply,
 					      "master_user",
 					      request->master_user);


More information about the dovecot-cvs mailing list