dovecot-2.2: *-login: If ssl=required, don't list any SASL mecha...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 22 15:59:55 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/9d21241fa792
changeset: 16391:9d21241fa792
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 22 15:59:38 2013 +0300
description:
*-login: If ssl=required, don't list any SASL mechanisms before STARTTLS.

diffstat:

 src/login-common/sasl-server.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 787ef06c4c95 -r 9d21241fa792 src/login-common/sasl-server.c
--- a/src/login-common/sasl-server.c	Wed May 22 15:57:13 2013 +0300
+++ b/src/login-common/sasl-server.c	Wed May 22 15:59:38 2013 +0300
@@ -13,6 +13,7 @@
 #include "auth-client.h"
 #include "ssl-proxy.h"
 #include "master-service.h"
+#include "master-service-ssl-settings.h"
 #include "master-interface.h"
 #include "master-auth.h"
 #include "client-common.h"
@@ -38,7 +39,8 @@
 	unsigned int i, j, count;
 
 	mech = auth_client_get_available_mechs(auth_client, &count);
-	if (count == 0) {
+	if (count == 0 || (!client->secured &&
+			   strcmp(client->ssl_set->ssl, "required") == 0)) {
 		*count_r = 0;
 		return NULL;
 	}


More information about the dovecot-cvs mailing list