]> diplodocus.org Git - nmh/commitdiff
Don't call sm_auth_sasl() for XAUTH2 with -sasl. Instead,
authorDavid Levine <david.levine@gonift.com>
Sun, 27 Mar 2016 16:00:16 +0000 (12:00 -0400)
committerDavid Levine <david.levine@gonift.com>
Sun, 27 Mar 2016 16:00:16 +0000 (12:00 -0400)
call only sm_auth_xoauth2().

mts/smtp/smtp.c

index 39cb713ab2d5ff3bba49cee68c239deaa2111e5a..1403102b28e4354063ab51a99df9135e3537b1a4 100644 (file)
@@ -375,7 +375,10 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose,
                             saslmech, server_mechs);
        }
 
                             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;
                         server) != RP_OK) {
            sm_end(NOTOK);
            return NOTOK;