dovecot-2.0: login: If master login fails, make sure the client ...

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 9 18:39:19 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/a859ab0d760e
changeset: 11505:a859ab0d760e
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 09 16:38:33 2010 +0100
description:
login: If master login fails, make sure the client gets disconnected.

diffstat:

 src/login-common/client-common-auth.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 279bf7435603 -r a859ab0d760e src/login-common/client-common-auth.c
--- a/src/login-common/client-common-auth.c	Wed Jun 09 16:37:57 2010 +0100
+++ b/src/login-common/client-common-auth.c	Wed Jun 09 16:38:33 2010 +0100
@@ -429,6 +429,11 @@
 					 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


More information about the dovecot-cvs mailing list