dovecot-2.0: login proxy: Fixed assert-crash on io_add() when cl...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 23 21:20:24 EEST 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/39655869f2ee
changeset: 12880:39655869f2ee
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 23 21:20:13 2011 +0300
description:
login proxy: Fixed assert-crash on io_add() when client disconnects at a bad time.
diffstat:
src/login-common/client-common-auth.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r 2f988e370a41 -r 39655869f2ee src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c Tue Aug 23 20:43:36 2011 +0300
+++ b/src/login-common/client-common-auth.c Tue Aug 23 21:20:13 2011 +0300
@@ -127,6 +127,15 @@
{
string_t *str = t_str_new(128);
+ if (client->input->closed) {
+ /* input stream got closed in client_send_raw_data().
+ In most places we don't have to check for this explicitly,
+ but login_proxy_detach() attempts to get and use the
+ istream's fd, which is now -1. */
+ client_destroy(client, "Disconnected");
+ return;
+ }
+
str_printfa(str, "proxy(%s): started proxying to %s:%u",
client->virtual_user,
login_proxy_get_host(client->login_proxy),
More information about the dovecot-cvs
mailing list