X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mutt_sasl.c;h=33e2b3ae1c281fca03c14f9aa00c0dc020c75cb6;hp=6a201377cc3975ccfb152d0b27d17b48b916cb09;hb=f2c6ea5470ab89bf4fd14958cc1090bedbb5b2e8;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1 diff --git a/mutt_sasl.c b/mutt_sasl.c index 6a20137..33e2b3a 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -18,12 +18,17 @@ /* common SASL helper routines */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include "mutt.h" #include "account.h" #include "mutt_sasl.h" #include "mutt_socket.h" #ifdef USE_SASL2 +#include #include #include #else @@ -189,7 +194,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 +298,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 +315,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;