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

dovecot at dovecot.org dovecot at dovecot.org
Thu May 8 13:21:11 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.0/rev/48f90e7e92dc
changeset: 13109:48f90e7e92dc
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 08 16:20:36 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.c         |  2 ++
 src/login-common/ssl-proxy.h         |  1 +
 4 files changed, 6 insertions(+), 2 deletions(-)

diffs (55 lines):

diff -r 74d9f61e224d -r 48f90e7e92dc src/login-common/client-common.c
--- a/src/login-common/client-common.c	Tue Nov 27 08:44:12 2012 +0200
+++ b/src/login-common/client-common.c	Thu May 08 16:20:36 2014 +0300
@@ -105,6 +105,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 74d9f61e224d -r 48f90e7e92dc src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c	Tue Nov 27 08:44:12 2012 +0200
+++ b/src/login-common/ssl-proxy-openssl.c	Thu May 08 16:20:36 2014 +0300
@@ -103,7 +103,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 *
@@ -845,7 +844,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 74d9f61e224d -r 48f90e7e92dc src/login-common/ssl-proxy.c
--- a/src/login-common/ssl-proxy.c	Tue Nov 27 08:44:12 2012 +0200
+++ b/src/login-common/ssl-proxy.c	Thu May 08 16:20:36 2014 +0300
@@ -77,6 +77,8 @@
 	return NULL;
 }
 
+void ssl_proxy_destroy(struct ssl_proxy *proxy ATTR_UNUSED) {}
+
 void ssl_proxy_free(struct ssl_proxy **proxy ATTR_UNUSED) {}
 
 unsigned int ssl_proxy_get_count(void)
diff -r 74d9f61e224d -r 48f90e7e92dc src/login-common/ssl-proxy.h
--- a/src/login-common/ssl-proxy.h	Tue Nov 27 08:44:12 2012 +0200
+++ b/src/login-common/ssl-proxy.h	Thu May 08 16:20:36 2014 +0300
@@ -30,6 +30,7 @@
 const char *ssl_proxy_get_last_error(const struct ssl_proxy *proxy) ATTR_PURE;
 const char *ssl_proxy_get_security_string(struct ssl_proxy *proxy);
 const char *ssl_proxy_get_compression(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