Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 28 Jul 2005 18:03:43 +0000 (18:03 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 28 Jul 2005 18:03:43 +0000 (18:03 +0000)
- fix typo for merge of $imap_login so that SASL2 logins work again (many thanks to Stephane Clodic <sclodic@teaser.fr> 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
mutt_sasl.c

index 2af7fbc..9bbd203 100644 (file)
--- 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)
 /* 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];
 
 typedef struct {
   char user[64];
index 5c661c7..de8b9de 100644 (file)
@@ -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 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)
 #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);
 
     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++;
   }
 
     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;
 
   *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;
 }
 
   return SASL_OK;
 }