From: Timo Sirainen Date: Wed, 9 Jun 2010 15:38:33 +0000 (+0100) Subject: login: If master login fails, make sure the client gets disconnected. X-Git-Tag: 2.0.beta6~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0348172a5278d1f5aa2440f30346c390ddc17318;p=thirdparty%2Fdovecot%2Fcore.git login: If master login fails, make sure the client gets disconnected. --HG-- branch : HEAD --- diff --git a/src/login-common/client-common-auth.c b/src/login-common/client-common-auth.c index 3e85fb70ba..f692aeeb50 100644 --- a/src/login-common/client-common-auth.c +++ b/src/login-common/client-common-auth.c @@ -429,6 +429,11 @@ sasl_callback(struct client *client, enum sasl_server_reply sasl_reply, CLIENT_CMD_REPLY_AUTH_FAIL_TEMP, data); } + /* the fd may still be hanging somewhere in kernel or another + process. make sure the client gets disconnected. */ + if (shutdown(client->fd, SHUT_RDWR) < 0) + i_error("shutdown() failed: %m"); + if (data == NULL) client_destroy_internal_failure(client); else