]> diplodocus.org Git - nmh/blobdiff - mts/smtp/smtp.c
Fixed comments describing decodeBase64().
[nmh] / mts / smtp / smtp.c
index 39cb713ab2d5ff3bba49cee68c239deaa2111e5a..3516f7760f790025d5146c296da611f923954411 100644 (file)
@@ -94,7 +94,7 @@ static FILE *sm_wfp = NULL;
  */
 
 static sasl_conn_t *conn = NULL;       /* SASL connection state */
-static int sasl_complete = 0;          /* Has authentication succeded? */
+static int sasl_complete = 0;          /* Has authentication succeeded? */
 static sasl_ssf_t sasl_ssf;            /* Our security strength factor */
 static int maxoutbuf;                  /* Maximum crypto output buffer */
 static char *sasl_outbuffer;           /* SASL output buffer for encryption */
@@ -375,7 +375,10 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose,
                             saslmech, server_mechs);
        }
 
-       if (sm_auth_sasl(user, saslssf, saslmech ? saslmech : server_mechs,
+        /* Don't call sm_auth_sasl() for XAUTH2 with -sasl.  Instead, call
+           sm_auth_xoauth2() below. */
+       if (xoauth_client_res == NULL  &&
+            sm_auth_sasl(user, saslssf, saslmech ? saslmech : server_mechs,
                         server) != RP_OK) {
            sm_end(NOTOK);
            return NOTOK;
@@ -1446,7 +1449,7 @@ tls_negotiate(void)
 #endif /* TLS_SUPPORT */
 
 /*
- * Convenience functions to replace occurences of fputs() and fputc()
+ * Convenience functions to replace occurrences of fputs() and fputc()
  */
 
 static int