[dovecot-cvs] dovecot/src/pop3-login client-authenticate.c, 1.52, 1.53 client.c, 1.58, 1.59

tss at dovecot.org tss at dovecot.org
Sun Nov 12 12:41:40 UTC 2006


Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv14605/pop3-login

Modified Files:
	client-authenticate.c client.c 
Log Message:
Fixed potential problems with client disconnecting while master was handling
the login.



Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client-authenticate.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- client-authenticate.c	7 Nov 2006 15:06:25 -0000	1.52
+++ client-authenticate.c	12 Nov 2006 12:41:37 -0000	1.53
@@ -156,7 +156,9 @@
 	const char *msg;
 	size_t data_len;
 
-	i_assert(!client->destroyed || reply == SASL_SERVER_REPLY_CLIENT_ERROR);
+	i_assert(!client->destroyed ||
+		 reply == SASL_SERVER_REPLY_CLIENT_ERROR ||
+		 reply == SASL_SERVER_REPLY_MASTER_FAILED);
 
 	switch (reply) {
 	case SASL_SERVER_REPLY_SUCCESS:

Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- client.c	7 Nov 2006 15:19:36 -0000	1.58
+++ client.c	12 Nov 2006 12:41:37 -0000	1.59
@@ -359,6 +359,9 @@
 	if (client->output != NULL)
 		o_stream_close(client->output);
 
+	if (client->common.master_tag != 0)
+		master_request_abort(&client->common);
+
 	if (client->common.auth_request != NULL) {
 		i_assert(client->common.authenticating);
 		sasl_server_auth_client_error(&client->common, NULL);
@@ -366,9 +369,6 @@
 		i_assert(!client->common.authenticating);
 	}
 
-	if (client->common.master_tag != 0)
-		master_request_abort(&client->common);
-
 	if (client->io != NULL)
 		io_remove(&client->io);
 
@@ -392,8 +392,10 @@
 		client->proxy = NULL;
 	}
 
-	if (client->common.proxy != NULL)
+	if (client->common.proxy != NULL) {
 		ssl_proxy_free(client->common.proxy);
+		client->common.proxy = NULL;
+	}
 	client_unref(client);
 
 	main_listen_start();



More information about the dovecot-cvs mailing list