X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=mutt_sasl.c;h=04340a15ee6ef8deeaa231852304d69e7c3c2019;hb=6e997d9ff55a392658fddfda5b95742c98d7de0b;hp=6a201377cc3975ccfb152d0b27d17b48b916cb09;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1;p=apps%2Fmadmutt.git diff --git a/mutt_sasl.c b/mutt_sasl.c index 6a20137..04340a1 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -24,6 +24,7 @@ #include "mutt_socket.h" #ifdef USE_SASL2 +#include #include #include #else @@ -189,7 +190,7 @@ int mutt_sasl_client_new (CONNECTION* conn, sasl_conn_t** saslconn) service = "imap"; break; case M_ACCT_TYPE_POP: - service = "pop-3"; + service = "pop"; break; default: dprint (1, (debugfile, "mutt_sasl_client_new: account type unset\n")); @@ -293,7 +294,7 @@ dprint(1,(debugfile, "local ip: %s, remote ip:%s\n", iplocalport, ipremoteport)) * If someone does it'd probably be trivial to write mutt_nss_get_ssf(). * I have a feeling more SSL code could be shared between those two files, * but I haven't looked into it yet, since I still don't know the APIs. */ -#if defined(USE_SSL) && !defined(USE_NSS) +#if (defined(USE_SSL) || defined(USE_GNUTLS) && !defined(USE_NSS) if (conn->account.flags & M_ACCT_SSL) { #ifdef USE_SASL2 /* I'm not sure this actually has an effect, at least with SASLv2 */ @@ -310,8 +311,8 @@ dprint(1,(debugfile, "local ip: %s, remote ip:%s\n", iplocalport, ipremoteport)) return -1; } #ifdef USE_SASL2 - dprint (2, (debugfile, "External authentication name: %s\n","NULL")); - if (sasl_setprop (*saslconn, SASL_AUTH_EXTERNAL, NULL) != SASL_OK) + dprint (2, (debugfile, "External authentication name: %s\n", conn->account.user)); + if (sasl_setprop (*saslconn, SASL_AUTH_EXTERNAL, conn->account.user) != SASL_OK) { dprint (1, (debugfile, "mutt_sasl_client_new: Error setting external properties\n")); return -1;