Mercurial > dovecot > core-2.2
changeset 1085:40c2be9abdd3 HEAD
Send protocol with auth requests
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 02 Feb 2003 12:53:43 +0200 |
parents | 86b8c9cb7ac0 |
children | 067130d609b7 |
files | src/imap-login/client-authenticate.c src/login-common/auth-connection.c src/login-common/auth-connection.h src/pop3-login/client-authenticate.c |
diffstat | 4 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap-login/client-authenticate.c Sun Feb 02 12:46:20 2003 +0200 +++ b/src/imap-login/client-authenticate.c Sun Feb 02 12:53:43 2003 +0200 @@ -176,8 +176,8 @@ buffer_append(client->plain_login, pass, strlen(pass)); client_ref(client); - if (auth_init_request(AUTH_MECH_PLAIN, login_callback, - &client->common, &error)) { + if (auth_init_request(AUTH_MECH_PLAIN, AUTH_PROTOCOL_IMAP, + login_callback, &client->common, &error)) { /* don't read any input from client until login is finished */ if (client->common.io != NULL) { io_remove(client->common.io); @@ -296,8 +296,8 @@ } client_ref(client); - if (auth_init_request(mech->mech, authenticate_callback, - &client->common, &error)) { + if (auth_init_request(mech->mech, AUTH_PROTOCOL_IMAP, + authenticate_callback, &client->common, &error)) { /* following input data will go to authentication */ if (client->common.io != NULL) io_remove(client->common.io);
--- a/src/login-common/auth-connection.c Sun Feb 02 12:46:20 2003 +0200 +++ b/src/login-common/auth-connection.c Sun Feb 02 12:53:43 2003 +0200 @@ -274,8 +274,9 @@ i_stream_skip(conn->input, conn->reply.data_size); } -int auth_init_request(enum auth_mech mech, auth_callback_t callback, - void *context, const char **error) +int auth_init_request(enum auth_mech mech, enum auth_protocol protocol, + auth_callback_t callback, void *context, + const char **error) { struct auth_connection *conn; struct auth_request *request; @@ -304,6 +305,7 @@ /* send request to auth */ auth_request.type = AUTH_LOGIN_REQUEST_NEW; + auth_request.protocol = protocol; auth_request.mech = request->mech; auth_request.id = request->id; if (o_stream_send(request->conn->output, &auth_request,
--- a/src/login-common/auth-connection.h Sun Feb 02 12:46:20 2003 +0200 +++ b/src/login-common/auth-connection.h Sun Feb 02 12:53:43 2003 +0200 @@ -43,8 +43,9 @@ extern enum auth_mech available_auth_mechs; -int auth_init_request(enum auth_mech mech, auth_callback_t *callback, - void *context, const char **error); +int auth_init_request(enum auth_mech mech, enum auth_protocol protocol, + auth_callback_t callback, void *context, + const char **error); void auth_continue_request(struct auth_request *request, const unsigned char *data, size_t data_size);
--- a/src/pop3-login/client-authenticate.c Sun Feb 02 12:46:20 2003 +0200 +++ b/src/pop3-login/client-authenticate.c Sun Feb 02 12:53:43 2003 +0200 @@ -178,8 +178,8 @@ buffer_append(client->plain_login, args, strlen(args)); client_ref(client); - if (auth_init_request(AUTH_MECH_PLAIN, login_callback, - &client->common, &error)) { + if (auth_init_request(AUTH_MECH_PLAIN, AUTH_PROTOCOL_IMAP, + login_callback, &client->common, &error)) { /* don't read any input from client until login is finished */ if (client->common.io != NULL) { io_remove(client->common.io); @@ -282,8 +282,8 @@ } client_ref(client); - if (auth_init_request(mech->mech, authenticate_callback, - &client->common, &error)) { + if (auth_init_request(mech->mech, AUTH_PROTOCOL_IMAP, + authenticate_callback, &client->common, &error)) { /* following input data will go to authentication */ if (client->common.io != NULL) io_remove(client->common.io);