Cope with sasl_decode64() returning SASL_CONTINUE as well as SASL_OK.
authorPeter Maydell <pmaydell@chiark.greenend.org.uk>
Tue, 29 Apr 2008 17:04:38 +0000 (17:04 +0000)
committerPeter Maydell <pmaydell@chiark.greenend.org.uk>
Tue, 29 Apr 2008 17:04:38 +0000 (17:04 +0000)
ChangeLog
mts/smtp/smtp.c

index 42144d5..046a118 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-29  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Cope with sasl_decode64() returning SASL_CONTINUE, as
+       happens with newer sasl libraries and LOGIN auth.
+
 2008-04-27  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
 
        * Updated some of the 'how to do a release' documentation.
 2008-04-27  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
 
        * Updated some of the 'how to do a release' documentation.
index 1ab027f..9527a5e 100644 (file)
@@ -1246,7 +1246,7 @@ sm_auth_sasl(char *user, char *mechlist, char *host)
            result = sasl_decode64(sm_reply.text, sm_reply.length,
                                   outbuf, sizeof(outbuf), &outlen);
        
            result = sasl_decode64(sm_reply.text, sm_reply.length,
                                   outbuf, sizeof(outbuf), &outlen);
        
-           if (result != SASL_OK) {
+           if (result != SASL_OK && result != SASL_CONTINUE) {
                smtalk(SM_AUTH, "*");
                sm_ierror("SASL base64 decode failed: %s",
                          sasl_errstring(result, NULL, NULL));
                smtalk(SM_AUTH, "*");
                sm_ierror("SASL base64 decode failed: %s",
                          sasl_errstring(result, NULL, NULL));