]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login: If master login fails, tell auth process to free the auth request.
authorTimo Sirainen <tss@iki.fi>
Tue, 28 Sep 2010 16:41:43 +0000 (17:41 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 28 Sep 2010 16:41:43 +0000 (17:41 +0100)
src/login-common/client-common.h
src/login-common/sasl-server.c

index 63100c634ad33af99abb7d3797968fa96ea643ab..32006ee91acb48774f3e493649a53076052bf61c 100644 (file)
@@ -101,6 +101,7 @@ struct client {
        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;
 
index 2132b3d66c95b5595b474b4ee4659abc83da79b3..128edd548bcec7c83f4c371082cee04ec9d761b4 100644 (file)
@@ -104,6 +104,8 @@ master_auth_callback(const struct master_auth_reply *reply, void *context)
                        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 @@ static void master_send_request(struct anvil_request *anvil_request)
        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);
 }