dovecot-2.2: *-login: SSL connections didn't get closed when the...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 7 14:26:59 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/41622541a7a3
changeset: 17334:41622541a7a3
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 07 17:26:21 2014 +0300
description:
*-login: SSL connections didn't get closed when the client got destroyed.

diffstat:

 src/login-common/client-common.c     |  2 ++
 src/login-common/ssl-proxy-openssl.c |  3 +--
 src/login-common/ssl-proxy.h         |  1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r 7a08a481c133 -r 41622541a7a3 src/login-common/client-common.c
--- a/src/login-common/client-common.c	Wed May 07 17:12:19 2014 +0300
+++ b/src/login-common/client-common.c	Wed May 07 17:26:21 2014 +0300
@@ -171,6 +171,8 @@
 		last_client = client->prev;
 	DLLIST_REMOVE(&clients, client);
 
+	if (!client->login_success && client->ssl_proxy != NULL)
+		ssl_proxy_destroy(client->ssl_proxy);
 	if (client->input != NULL)
 		i_stream_close(client->input);
 	if (client->output != NULL)
diff -r 7a08a481c133 -r 41622541a7a3 src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c	Wed May 07 17:12:19 2014 +0300
+++ b/src/login-common/ssl-proxy-openssl.c	Wed May 07 17:26:21 2014 +0300
@@ -116,7 +116,6 @@
 static void ssl_read(struct ssl_proxy *proxy);
 static void ssl_write(struct ssl_proxy *proxy);
 static void ssl_step(struct ssl_proxy *proxy);
-static void ssl_proxy_destroy(struct ssl_proxy *proxy);
 static void ssl_proxy_unref(struct ssl_proxy *proxy);
 
 static struct ssl_server_context *
@@ -807,7 +806,7 @@
 	i_free(proxy);
 }
 
-static void ssl_proxy_destroy(struct ssl_proxy *proxy)
+void ssl_proxy_destroy(struct ssl_proxy *proxy)
 {
 	if (proxy->destroyed)
 		return;
diff -r 7a08a481c133 -r 41622541a7a3 src/login-common/ssl-proxy.h
--- a/src/login-common/ssl-proxy.h	Wed May 07 17:12:19 2014 +0300
+++ b/src/login-common/ssl-proxy.h	Wed May 07 17:26:21 2014 +0300
@@ -34,6 +34,7 @@
 const char *ssl_proxy_get_security_string(struct ssl_proxy *proxy);
 const char *ssl_proxy_get_compression(struct ssl_proxy *proxy);
 const char *ssl_proxy_get_cert_error(struct ssl_proxy *proxy);
+void ssl_proxy_destroy(struct ssl_proxy *proxy);
 void ssl_proxy_free(struct ssl_proxy **proxy);
 
 /* Return number of active SSL proxies */


More information about the dovecot-cvs mailing list