[dovecot-cvs] dovecot/src/imap-login client-authenticate.c, 1.40, 1.41

cras at dovecot.org cras at dovecot.org
Sat Jun 17 20:19:35 EEST 2006


Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv16708/src/imap-login

Modified Files:
	client-authenticate.c 
Log Message:
Added support for SASL-IR extension.



Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/client-authenticate.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- client-authenticate.c	5 Jun 2006 20:25:40 -0000	1.40
+++ client-authenticate.c	17 Jun 2006 17:19:33 -0000	1.41
@@ -238,16 +238,20 @@
 	/* we want only one argument: authentication mechanism name */
 	if (args[0].type != IMAP_ARG_ATOM && args[0].type != IMAP_ARG_STRING)
 		return -1;
-	if (args[1].type != IMAP_ARG_EOL)
-		return -1;
+	if (args[1].type != IMAP_ARG_EOL) {
+		/* optional SASL initial response */
+		if (args[1].type != IMAP_ARG_ATOM ||
+		    args[2].type != IMAP_ARG_EOL)
+			return -1;
+	}
 
 	mech_name = IMAP_ARG_STR(&args[0]);
 	if (*mech_name == '\0')
 		return 0;
 
 	client_ref(client);
-	sasl_server_auth_begin(&client->common, "IMAP", mech_name, NULL,
-			       sasl_callback);
+	sasl_server_auth_begin(&client->common, "IMAP", mech_name,
+			       IMAP_ARG_STR(&args[1]), sasl_callback);
 	if (!client->common.authenticating)
 		return 1;
 



More information about the dovecot-cvs mailing list