[dovecot-cvs]
dovecot/src/imap-login client-authenticate.c, 1.39.2.1, 1.39.2.2
cras at dovecot.org
cras at dovecot.org
Sat Jun 17 20:19:31 EEST 2006
Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv31181/src/imap-login
Modified Files:
Tag: branch_1_0
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.39.2.1
retrieving revision 1.39.2.2
diff -u -d -r1.39.2.1 -r1.39.2.2
--- client-authenticate.c 5 Jun 2006 20:25:13 -0000 1.39.2.1
+++ client-authenticate.c 17 Jun 2006 17:19:29 -0000 1.39.2.2
@@ -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