/* 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 <errno.h>
#include <netdb.h>
#include <sasl/sasl.h>
#else
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"));
* 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_GNUTLS) && !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 */
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;