dovecot-2.1: *-login: Flush SSL output when logging out.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 5 09:36:23 UTC 2014
details: http://hg.dovecot.org/dovecot-2.1/rev/1afc053e0f88
changeset: 15018:1afc053e0f88
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 05 11:30:19 2014 +0300
description:
*-login: Flush SSL output when logging out.
The BYE and LOGOUT replies weren't being sent when they were sent from
imap-login process (before logging in).
diffstat:
src/login-common/client-common.c | 1 +
src/login-common/ssl-proxy-openssl.c | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diffs (34 lines):
diff -r 89c0689ab00b -r 1afc053e0f88 src/login-common/client-common.c
--- a/src/login-common/client-common.c Wed Apr 23 23:26:49 2014 +0300
+++ b/src/login-common/client-common.c Thu Jun 05 11:30:19 2014 +0300
@@ -142,6 +142,7 @@
last_client = client->prev;
DLLIST_REMOVE(&clients, client);
+ o_stream_uncork(client->output);
if (!client->login_success && client->ssl_proxy != NULL)
ssl_proxy_destroy(client->ssl_proxy);
if (client->input != NULL)
diff -r 89c0689ab00b -r 1afc053e0f88 src/login-common/ssl-proxy-openssl.c
--- a/src/login-common/ssl-proxy-openssl.c Wed Apr 23 23:26:49 2014 +0300
+++ b/src/login-common/ssl-proxy-openssl.c Thu Jun 05 11:30:19 2014 +0300
@@ -782,10 +782,19 @@
i_free(proxy);
}
+static void ssl_proxy_flush(struct ssl_proxy *proxy)
+{
+ /* this is pretty kludgy. mainly this is just for flushing the final
+ LOGOUT command output. */
+ plain_read(proxy);
+ ssl_step(proxy);
+}
+
void ssl_proxy_destroy(struct ssl_proxy *proxy)
{
if (proxy->destroyed)
return;
+ ssl_proxy_flush(proxy);
proxy->destroyed = TRUE;
ssl_proxy_count--;
More information about the dovecot-cvs
mailing list