From 1abd265879dc5db7e9968a3b4ea7e2031e6b953e Mon Sep 17 00:00:00 2001 From: pdmef Date: Thu, 28 Jul 2005 18:03:43 +0000 Subject: [PATCH] Rocco Rutte: - fix typo for merge of $imap_login so that SASL2 logins work again (many thanks to Stephane Clodic for providing lots of info and debug environment!) - add one more missing chunk while merging in changes back in r174 (!) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@363 e385b8ad-14ed-0310-8656-cc95a2468c6d --- account.h | 6 +++--- mutt_sasl.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/account.h b/account.h index 2af7fbc..9bbd203 100644 --- a/account.h +++ b/account.h @@ -25,9 +25,9 @@ enum { /* account flags */ #define M_ACCT_PORT (1<<0) #define M_ACCT_USER (1<<1) -#define M_ACCT_LOGIN (1<<1) -#define M_ACCT_PASS (1<<2) -#define M_ACCT_SSL (1<<3) +#define M_ACCT_LOGIN (1<<2) +#define M_ACCT_PASS (1<<3) +#define M_ACCT_SSL (1<<4) typedef struct { char user[64]; diff --git a/mutt_sasl.c b/mutt_sasl.c index 5c661c7..de8b9de 100644 --- a/mutt_sasl.c +++ b/mutt_sasl.c @@ -292,8 +292,8 @@ int mutt_sasl_client_new (CONNECTION * conn, sasl_conn_t ** saslconn) * 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 (conn->account.flags & M_ACCT_SSL) { +#if defined(USE_SSL) || defined(USE_GNUTLS) + if (conn->ssf) { #ifdef USE_SASL2 /* I'm not sure this actually has an effect, at least with SASLv2 */ debug_print (2, ("External SSF: %d\n", conn->ssf)); if (sasl_setprop (*saslconn, SASL_SSF_EXTERNAL, &(conn->ssf)) != SASL_OK) @@ -369,7 +369,7 @@ int mutt_sasl_interact (sasl_interact_t * interaction) interaction->len = mutt_strlen (resp) + 1; interaction->result = safe_malloc (interaction->len); - memcpy (interaction->result, resp, interaction->len); + memcpy ((char*) interaction->result, resp, interaction->len); interaction++; } @@ -495,7 +495,7 @@ static int mutt_sasl_cb_pass (sasl_conn_t * conn, void *context, int id, *psecret = (sasl_secret_t *) safe_malloc (sizeof (sasl_secret_t) + len); (*psecret)->len = len; - strcpy ((*psecret)->data, account->pass); /* __STRCPY_CHECKED__ */ + strcpy ((char*) (*psecret)->data, account->pass); /* __STRCPY_CHECKED__ */ return SASL_OK; } -- 2.20.1