dovecot-1.2: auth: If initial SASL reply was given but empty, pa...

dovecot at dovecot.org dovecot at dovecot.org
Tue May 26 03:33:50 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.2/rev/76d455a7f4da
changeset: 9078:76d455a7f4da
user:      Timo Sirainen <tss at iki.fi>
date:      Mon May 25 20:33:42 2009 -0400
description:
auth: If initial SASL reply was given but empty, pass it to auth mechanisms.

diffstat:

1 file changed, 5 insertions(+), 1 deletion(-)
src/auth/mech.c |    6 +++++-

diffs (40 lines):

diff -r 7cb4741f076e -r 76d455a7f4da src/auth/mech.c
--- 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 au
 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_apo
 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 @@ void mech_init(void)
 	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 @@ void mech_deinit(void)
 	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);


More information about the dovecot-cvs mailing list