[Dovecot] [PATCH] add initial response support for NTLM and RPA

Andrey Panin pazke at donpac.ru
Fri Nov 19 14:31:31 EET 2004


Hello,

this patch adds initial response support for NTLM and RPA
authentication mechanism. It can be useful if dovecot acts
as authentication backend for SMTP server. RFC2554 permits
initial response in AUTH command, so it's legal to send NTLM
type 1 message or RPA token 1 in it.

Please consider applying.

Best regards.

-- 
Andrey Panin		| Linux and UNIX system administrator
pazke at donpac.ru		| PGP key: wwwkeys.pgp.net
-------------- next part --------------
diff -urdpNX /usr/share/dontdiff -x debian dovecot-1.0-test52.vanilla/src/auth/mech-ntlm.c dovecot-1.0-test52/src/auth/mech-ntlm.c
--- dovecot-1.0-test52.vanilla/src/auth/mech-ntlm.c	2004-11-07 13:41:25.000000000 +0300
+++ dovecot-1.0-test52/src/auth/mech-ntlm.c	2004-11-14 00:07:03.000000000 +0300
@@ -203,12 +208,14 @@ mech_ntlm_auth_continue(struct auth_requ
 }
 
 static void
-mech_ntlm_auth_initial(struct auth_request *auth_request,
-		       const unsigned char *data __attr_unused__,
-		       size_t data_size __attr_unused__,
+mech_ntlm_auth_initial(struct auth_request *request,
+		       const unsigned char *data, size_t data_size,
 		       mech_callback_t *callback)
 {
-	callback(auth_request, AUTH_CLIENT_RESULT_CONTINUE, NULL, 0);
+	if (data_size == 0)
+		callback(request, AUTH_CLIENT_RESULT_CONTINUE, NULL, 0);
+	else
+		mech_ntlm_auth_continue(request, data, data_size, callback);
 }
 
 static void
diff -urdpNX /usr/share/dontdiff -x debian dovecot-1.0-test52.vanilla/src/auth/mech-rpa.c dovecot-1.0-test52/src/auth/mech-rpa.c
--- dovecot-1.0-test52.vanilla/src/auth/mech-rpa.c	2004-11-07 13:41:25.000000000 +0300
+++ dovecot-1.0-test52/src/auth/mech-rpa.c	2004-11-14 00:07:09.000000000 +0300
@@ -541,12 +541,14 @@ mech_rpa_auth_continue(struct auth_reque
 }
 
 static void
-mech_rpa_auth_initial(struct auth_request *auth_request,
-		      const unsigned char *data __attr_unused__,
-		      size_t data_size __attr_unused__,
+mech_rpa_auth_initial(struct auth_request *request,
+		      const unsigned char *data, size_t data_size,
 		      mech_callback_t *callback)
 {
-	callback(auth_request, AUTH_CLIENT_RESULT_CONTINUE, NULL, 0);
+	if (data_size == 0)
+		callback(request, AUTH_CLIENT_RESULT_CONTINUE, NULL, 0);
+	else
+		mech_rpa_auth_continue(request, data, data_size, callback);
 }
 
 static void
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20041119/9a36ae06/attachment-0001.bin>


More information about the dovecot mailing list