dovecot-2.0: login: If master login fails, tell auth process to ...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 28 19:41:47 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/9939f0565916
changeset: 12196:9939f0565916
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 28 17:41:43 2010 +0100
description:
login: If master login fails, tell auth process to free the auth request.

diffstat:

 src/login-common/client-common.h |  1 +
 src/login-common/sasl-server.c   |  3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r cf1e5238f747 -r 9939f0565916 src/login-common/client-common.h
--- a/src/login-common/client-common.h	Tue Sep 28 17:15:52 2010 +0100
+++ b/src/login-common/client-common.h	Tue Sep 28 17:41:43 2010 +0100
@@ -101,6 +101,7 @@
 	struct auth_client_request *auth_request;
 	string_t *auth_response;
 
+	unsigned int master_auth_id;
 	unsigned int master_tag;
 	sasl_server_callback_t *sasl_callback;
 
diff -r cf1e5238f747 -r 9939f0565916 src/login-common/sasl-server.c
--- a/src/login-common/sasl-server.c	Tue Sep 28 17:15:52 2010 +0100
+++ b/src/login-common/sasl-server.c	Tue Sep 28 17:41:43 2010 +0100
@@ -104,6 +104,8 @@
 			break;
 		}
 		client->mail_pid = reply->mail_pid;
+	} else {
+		auth_client_send_cancel(auth_client, client->master_auth_id);
 	}
 	call_client_callback(client, sasl_reply, data, NULL);
 }
@@ -135,6 +137,7 @@
 	buffer_append(buf, data, size);
 	req.data_size = buf->used;
 
+	client->master_auth_id = req.auth_id;
 	master_auth_request(master_auth, client->fd, &req, buf->data,
 			    master_auth_callback, client, &client->master_tag);
 }


More information about the dovecot-cvs mailing list