commit fdb03b91f2471ebc1ee715c78911c8a1085791d1
Author: Oswald Buddenhagen <[email protected]>
Date: Sat Dec 3 20:58:23 2016 +0100
be more helpful when no SASL mechanisms are available
src/drv_imap.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/drv_imap.c b/src/drv_imap.c
index 5d77f08..9d7c824 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1944,6 +1944,7 @@ imap_open_store_authenticate2( imap_store_t *ctx )
string_list_t *mech, *cmech;
int auth_login = 0;
#ifdef HAVE_LIBSASL
+ const char *saslavail;
char saslmechs[1024], *saslend = saslmechs;
#endif
@@ -2022,6 +2023,14 @@ imap_open_store_authenticate2( imap_store_t *ctx )
free( enc );
return;
notsasl:
+ if (!ctx->sasl || sasl_listmech( ctx->sasl, NULL, "", "", "",
&saslavail, NULL, NULL ) != SASL_OK)
+ saslavail = "(none)"; /* EXTERNAL is always there
anyway. */
+ if (!auth_login) {
+ error( "IMAP error: selected SASL mechanism(s) not
available;\n"
+ " selected:%s\n available: %s\n", saslmechs,
saslavail );
+ goto bail;
+ }
+ info( "NOT using available SASL mechanism(s): %s\n", saslavail
);
sasl_dispose( &ctx->sasl );
}
#endif
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel