]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login: If master login fails, make sure the client gets disconnected.
authorTimo Sirainen <tss@iki.fi>
Wed, 9 Jun 2010 15:38:33 +0000 (16:38 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 9 Jun 2010 15:38:33 +0000 (16:38 +0100)
--HG--
branch : HEAD

src/login-common/client-common-auth.c

index 3e85fb70baccae3c897992ea20e9b2f0deca5421..f692aeeb508f9ce911c8664d06a76964ef4452af 100644 (file)
@@ -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