File mutt-1.9.1.dif of Package mutt

---
 configure.ac    |   10 +++++++++-
 doc/Muttrc.head |    2 +-
 imap/auth.c     |   20 ++++++++++++++++++++
 init.h          |    3 +++
 mx.c            |    3 +++
 5 files changed, 36 insertions(+), 2 deletions(-)

--- configure.ac
+++ configure.ac	2017-09-11 11:24:08.296326161 +0000
@@ -337,7 +337,7 @@ main ()
 			mutt_cv_slang=$withval
 			if test -d $withval/include/slang; then
 				CPPFLAGS="$CPPFLAGS -I${withval}/include/slang"
-			elif test -d $withval/include; then
+			elif test -d $withval/include && test $withval != /usr ; then
 				CPPFLAGS="$CPPFLAGS -I${withval}/include"
 			fi
 			LDFLAGS="$LDFLAGS -L${withval}/lib"
@@ -510,8 +510,12 @@ dnl -- end imap dependencies --
 AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl@<:@=PFX@:>@],[Enable TLS support using OpenSSL]),
 [	if test "$with_ssl" != "no"; then
 		if test "$with_ssl" != "yes"; then
+		    case $withval in /usr|/usr/local) ;;
+		    *)
 			LDFLAGS="$LDFLAGS -L$withval/lib"
 			CPPFLAGS="$CPPFLAGS -I$withval/include"
+			;;
+		    esac
 		fi
 		saved_LIBS="$LIBS"
 
@@ -574,8 +578,12 @@ AC_ARG_WITH(sasl, AS_HELP_STRING([--with
 	[
 	if test "$with_sasl" != "no"; then
 		if test "$with_sasl" != "yes"; then
+		    case $with_sasl in /usr|/usr/local) ;;
+		    *)
 			CPPFLAGS="$CPPFLAGS -I$with_sasl/include"
 			LDFLAGS="$LDFLAGS -L$with_sasl/lib"
+			;;
+		    esac
 		fi
 
 		# OpenSolaris provides a SASL2 interface in libsasl
--- doc/Muttrc.head
+++ doc/Muttrc.head	2017-09-11 11:24:59.871380290 +0000
@@ -23,7 +23,7 @@ macro index,pager,attach,compose \cb "\
 "call urlview to extract URLs out of a message"
 
 # Show documentation when pressing F1
-macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
+macro generic,index,pager <F1> "<shell-escape> less @docdir@/manual.txt.gz<Enter>" "show Mutt documentation"
 
 # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
 macro index,pager y "<change-folder>?" "show incoming mailboxes list"
--- imap/auth.c
+++ imap/auth.c	2017-09-11 11:26:50.141357697 +0000
@@ -80,6 +80,23 @@ int imap_authenticate(struct ImapData *i
       mutt_debug(2, "imap_authenticate: Trying method %s\n", method);
       authenticator = imap_authenticators;
 
+#ifdef USE_SASL
+      /* "login" not supported by SASL */
+      if (!mutt_strcasecmp ("login", method))
+      {
+        while (authenticator->authenticate)
+        {
+          const char *identify = authenticator->method;
+          if (identify && !mutt_strcasecmp(identify, method))
+            if ((r = authenticator->authenticate(idata, method)) != IMAP_AUTH_UNAVAIL)
+            {
+              FREE(&methods);
+              return r;
+            }
+          authenticator++;
+        }
+      } else {
+#endif
       while (authenticator->authenticate)
       {
         if (!authenticator->method || (mutt_strcasecmp(authenticator->method, method) == 0))
@@ -91,6 +108,9 @@ int imap_authenticate(struct ImapData *i
 
         authenticator++;
       }
+#ifdef USE_SASL
+      }
+#endif
     }
 
     FREE(&methods);
--- init.h
+++ init.h	2017-09-11 11:27:51.208237439 +0000
@@ -3864,6 +3864,9 @@ struct Option MuttVars[] = {
   ** the default from the GNUTLS library.
   */
 #endif /* USE_SSL_GNUTLS */
+#if defined(USE_IMAP) && defined(SUSE_IMAP_FORCE_SSL)
+  { "imap_force_ssl", DT_SYN, R_NONE, UL "ssl_force_tls", 0 },
+#endif
   { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSL_STARTTLS, MUTT_YES },
   /*
   ** .pp
--- mx.c
+++ mx.c	2017-09-11 11:14:29.263001870 +0000
@@ -1287,6 +1287,9 @@ void mx_update_context(struct Context *c
   {
     h = ctx->hdrs[msgno];
 
+    if (!h)
+      continue;
+
     if (WithCrypto)
     {
       /* NOTE: this _must_ be done before the check for mailcap! */
openSUSE Build Service is sponsored by