Mercurial > dovecot > core-2.2
changeset 19740:722216cfad93
*-login: Pass client_auth_reply to client.auth_result() whenever possible.
This didn't matter normally, but some plugins might care about it.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 10 Feb 2016 18:27:52 +0200 |
parents | 4e3662023aad |
children | 7b9c6dd8e41d |
files | src/login-common/client-common-auth.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/login-common/client-common-auth.c Wed Feb 10 16:54:43 2016 +0200 +++ b/src/login-common/client-common-auth.c Wed Feb 10 18:27:52 2016 +0200 @@ -552,6 +552,7 @@ sasl_reply == SASL_SERVER_REPLY_AUTH_ABORTED || sasl_reply == SASL_SERVER_REPLY_MASTER_FAILED); + memset(&reply, 0, sizeof(reply)); switch (sasl_reply) { case SASL_SERVER_REPLY_SUCCESS: if (client->to_auth_waiting != NULL) @@ -563,7 +564,7 @@ break; } client_auth_result(client, CLIENT_AUTH_RESULT_SUCCESS, - NULL, NULL); + &reply, NULL); client_destroy_success(client, "Login"); break; case SASL_SERVER_REPLY_AUTH_FAILED: @@ -580,14 +581,14 @@ if (sasl_reply == SASL_SERVER_REPLY_AUTH_ABORTED) { client_auth_result(client, CLIENT_AUTH_RESULT_ABORTED, - NULL, "Authentication aborted by client."); + &reply, "Authentication aborted by client."); } else if (data == NULL) { client_auth_result(client, - CLIENT_AUTH_RESULT_AUTHFAILED, NULL, + CLIENT_AUTH_RESULT_AUTHFAILED, &reply, AUTH_FAILED_MSG); } else { client_auth_result(client, - CLIENT_AUTH_RESULT_AUTHFAILED_REASON, NULL, + CLIENT_AUTH_RESULT_AUTHFAILED_REASON, &reply, data); } @@ -599,7 +600,7 @@ /* authentication itself succeeded, we just hit some internal failure. */ client_auth_result(client, CLIENT_AUTH_RESULT_TEMPFAIL, - NULL, data); + &reply, data); } /* the fd may still be hanging somewhere in kernel or another