dovecot-1.1: *-login: SSL connections didn't get closed when the...
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 8 14:06:30 UTC 2014
details: http://hg.dovecot.org/dovecot-1.1/rev/fe0e6550585c
changeset: 8378:fe0e6550585c
user: Timo Sirainen <tss at iki.fi>
date: Thu May 08 16:52:29 2014 +0300
description:
*-login: SSL connections didn't get closed when the client got destroyed.
diffstat:
src/imap-login/client.c | 2 ++
src/login-common/ssl-proxy-openssl.c | 3 +--
src/login-common/ssl-proxy.c | 2 ++
src/login-common/ssl-proxy.h | 1 +
src/pop3-login/client.c | 2 ++
5 files changed, 8 insertions(+), 2 deletions(-)
diffs (67 lines):
diff -r 0ce9c27b109b -r fe0e6550585c src/imap-login/client.c
--- a/src/imap-login/client.c Wed Jun 20 02:21:54 2012 +0300
+++ b/src/imap-login/client.c Thu May 08 16:52:29 2014 +0300
@@ -489,6 +489,8 @@
client_unlink(&client->common);
+ if (!client->login_success && client->common.proxy != NULL)
+ ssl_proxy_destroy(client->common.proxy);
if (client->input != NULL)
i_stream_close(client->input);
if (client->output != NULL)
diff -r 0ce9c27b109b -r fe0e6550585c src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c Wed Jun 20 02:21:54 2012 +0300
+++ b/src/login-common/ssl-proxy-openssl.c Thu May 08 16:52:29 2014 +0300
@@ -75,7 +75,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 void ssl_params_corrupted(const char *path)
@@ -616,7 +615,7 @@
main_unref();
}
-static void ssl_proxy_destroy(struct ssl_proxy *proxy)
+void ssl_proxy_destroy(struct ssl_proxy *proxy)
{
if (proxy->destroyed)
return;
diff -r 0ce9c27b109b -r fe0e6550585c src/login-common/ssl-proxy.c
--- a/src/login-common/ssl-proxy.c Wed Jun 20 02:21:54 2012 +0300
+++ b/src/login-common/ssl-proxy.c Thu May 08 16:52:29 2014 +0300
@@ -46,6 +46,8 @@
return "";
}
+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 0ce9c27b109b -r fe0e6550585c src/login-common/ssl-proxy.h
--- a/src/login-common/ssl-proxy.h Wed Jun 20 02:21:54 2012 +0300
+++ b/src/login-common/ssl-proxy.h Thu May 08 16:52:29 2014 +0300
@@ -16,6 +16,7 @@
bool ssl_proxy_is_handshaked(struct ssl_proxy *proxy);
const char *ssl_proxy_get_last_error(struct ssl_proxy *proxy);
const char *ssl_proxy_get_security_string(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 */
diff -r 0ce9c27b109b -r fe0e6550585c src/pop3-login/client.c
--- a/src/pop3-login/client.c Wed Jun 20 02:21:54 2012 +0300
+++ b/src/pop3-login/client.c Thu May 08 16:52:29 2014 +0300
@@ -359,6 +359,8 @@
client_unlink(&client->common);
+ if (!client->login_success && client->common.proxy != NULL)
+ ssl_proxy_destroy(client->common.proxy);
if (client->input != NULL)
i_stream_close(client->input);
if (client->output != NULL)
More information about the dovecot-cvs
mailing list