Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9078:76d455a7f4da HEAD
auth: If initial SASL reply was given but empty, pass it to auth mechanisms.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 25 May 2009 20:33:42 -0400 |
parents | 7cb4741f076e |
children | e3fe9b4a6a2d |
files | src/auth/mech.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/mech.c Mon May 25 19:44:56 2009 -0400 +++ b/src/auth/mech.c Mon May 25 20:33:42 2009 -0400 @@ -49,10 +49,11 @@ void mech_generic_auth_initial(struct auth_request *request, const unsigned char *data, size_t data_size) { - if (data_size == 0) { + if (data == NULL) { request->callback(request, AUTH_CLIENT_RESULT_CONTINUE, NULL, 0); } else { + /* initial reply given, even if it was 0 bytes */ request->mech->auth_continue(request, data, data_size); } } @@ -67,6 +68,7 @@ extern const struct mech_module mech_apop; extern const struct mech_module mech_cram_md5; extern const struct mech_module mech_digest_md5; +extern const struct mech_module mech_external; extern const struct mech_module mech_ntlm; extern const struct mech_module mech_otp; extern const struct mech_module mech_skey; @@ -88,6 +90,7 @@ mech_register_module(&mech_apop); mech_register_module(&mech_cram_md5); mech_register_module(&mech_digest_md5); + mech_register_module(&mech_external); if (getenv("USE_WINBIND") != NULL) { mech_register_module(&mech_winbind_ntlm); mech_register_module(&mech_winbind_spnego); @@ -113,6 +116,7 @@ mech_unregister_module(&mech_apop); mech_unregister_module(&mech_cram_md5); mech_unregister_module(&mech_digest_md5); + mech_unregister_module(&mech_external); if (getenv("NTLM_USE_WINBIND") != NULL) { mech_unregister_module(&mech_winbind_ntlm); mech_unregister_module(&mech_winbind_spnego);