dovecot-2.0: login: Master login internal failures weren't handl...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 9 18:39:19 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/279bf7435603
changeset: 11504:279bf7435603
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 09 16:37:57 2010 +0100
description:
login: Master login internal failures weren't handled correctly.

diffstat:

 src/login-common/client-common-auth.c |  19 ++++++++-----------
 src/login-common/sasl-server.c        |   2 +-
 src/login-common/sasl-server.h        |   1 -
 3 files changed, 9 insertions(+), 13 deletions(-)

diffs (62 lines):

diff -r b7fadc4eac7a -r 279bf7435603 src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c	Wed Jun 09 16:16:40 2010 +0100
+++ b/src/login-common/client-common-auth.c	Wed Jun 09 16:37:57 2010 +0100
@@ -382,7 +382,6 @@
 
 	i_assert(!client->destroyed ||
 		 sasl_reply == SASL_SERVER_REPLY_AUTH_ABORTED ||
-		 sasl_reply == SASL_SERVER_REPLY_MASTER_ABORTED ||
 		 sasl_reply == SASL_SERVER_REPLY_MASTER_FAILED);
 
 	switch (sasl_reply) {
@@ -423,19 +422,17 @@
 			client_auth_failed(client);
 		break;
 	case SASL_SERVER_REPLY_MASTER_FAILED:
+		if (data != NULL) {
+			/* authentication itself succeeded, we just hit some
+			   internal failure. */
+			client_send_line(client,
+					 CLIENT_CMD_REPLY_AUTH_FAIL_TEMP, data);
+		}
+
 		if (data == NULL)
 			client_destroy_internal_failure(client);
-		else {
-			client_send_line(client,
-					 CLIENT_CMD_REPLY_AUTH_FAIL_TEMP, data);
-			/* authentication itself succeeded, we just hit some
-			   internal failure. */
+		else
 			client_destroy_success(client, data);
-		}
-		break;
-	case SASL_SERVER_REPLY_MASTER_ABORTED:
-		/* mail process already sent the error message to client */
-		client_destroy_success(client, data);
 		break;
 	case SASL_SERVER_REPLY_CONTINUE:
 		client->v.auth_send_challenge(client, data);
diff -r b7fadc4eac7a -r 279bf7435603 src/login-common/sasl-server.c
--- a/src/login-common/sasl-server.c	Wed Jun 09 16:16:40 2010 +0100
+++ b/src/login-common/sasl-server.c	Wed Jun 09 16:37:57 2010 +0100
@@ -100,7 +100,7 @@
 			sasl_reply = SASL_SERVER_REPLY_SUCCESS;
 			break;
 		case MASTER_AUTH_STATUS_INTERNAL_ERROR:
-			sasl_reply = SASL_SERVER_REPLY_MASTER_ABORTED;
+			sasl_reply = SASL_SERVER_REPLY_MASTER_FAILED;
 			break;
 		}
 		client->mail_pid = reply->mail_pid;
diff -r b7fadc4eac7a -r 279bf7435603 src/login-common/sasl-server.h
--- a/src/login-common/sasl-server.h	Wed Jun 09 16:16:40 2010 +0100
+++ b/src/login-common/sasl-server.h	Wed Jun 09 16:37:57 2010 +0100
@@ -8,7 +8,6 @@
 	SASL_SERVER_REPLY_AUTH_FAILED,
 	SASL_SERVER_REPLY_AUTH_ABORTED,
 	SASL_SERVER_REPLY_MASTER_FAILED,
-	SASL_SERVER_REPLY_MASTER_ABORTED,
 	SASL_SERVER_REPLY_CONTINUE
 };
 


More information about the dovecot-cvs mailing list