diff options
author | Fabian Groffen <grobian@gentoo.org> | 2010-04-11 19:17:47 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2010-04-11 19:17:47 +0000 |
commit | 10621c7f8f4c19169e3311e5994f22c0c5e24ab0 (patch) | |
tree | 9bf59c9291a796a6b4ce371768502d05970b3028 /mail-client/mutt/files | |
parent | Revision bump to fix support for current stable net-misc/nx-3.4.0, bug #312879 (diff) | |
download | gentoo-2-10621c7f8f4c19169e3311e5994f22c0c5e24ab0.tar.gz gentoo-2-10621c7f8f4c19169e3311e5994f22c0c5e24ab0.tar.bz2 gentoo-2-10621c7f8f4c19169e3311e5994f22c0c5e24ab0.zip |
Huge spring cleaning action. Revision bump for latest fixes from upstream.
(Portage version: 2.2.00.15842-prefix/cvs/Darwin powerpc)
Diffstat (limited to 'mail-client/mutt/files')
37 files changed, 23 insertions, 2681 deletions
diff --git a/mail-client/mutt/files/mutt-1.5.19-libgnutls-test-15c662a95b91.patch b/mail-client/mutt/files/mutt-1.5.19-libgnutls-test-15c662a95b91.patch deleted file mode 100644 index 8ad4965ac64e..000000000000 --- a/mail-client/mutt/files/mutt-1.5.19-libgnutls-test-15c662a95b91.patch +++ /dev/null @@ -1,225 +0,0 @@ -http://dev.mutt.org/trac/changeset/15c662a95b91 - -Index: configure.ac -=================================================================== ---- configure.ac (revision 5862:16592f0dfdaf) -+++ configure.ac (revision 5865:15c662a95b91) -@@ -650,5 +650,5 @@ - dnl -- end imap dependencies -- - --AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl@<:@=PFX@:>@], [Compile in SSL support for POP/IMAP/SMTP using OpenSSL]), -+AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl@<:@=PFX@:>@], [Enable TLS support using OpenSSL]), - [ if test "$with_ssl" != "no" - then -@@ -683,5 +683,5 @@ - ]) - --AC_ARG_WITH([gnutls], AC_HELP_STRING([--with-gnutls@<:@=PFX@:>@], [Compile in SSL support for POP/IMAP/SMTP using gnutls]), -+AC_ARG_WITH([gnutls], AC_HELP_STRING([--with-gnutls@<:@=PFX@:>@], [enable TLS support using gnutls]), - [gnutls_prefix="$withval"], [gnutls_prefix="no"]) - if test "$gnutls_prefix" != "no" && test x"$need_ssl" != xyes -@@ -691,19 +691,28 @@ - AC_MSG_WARN([SSL support is only useful with POP, IMAP or SMTP support]) - else -- MUTT_AM_PATH_GNUTLS([$gnutls_prefix], -+ if test "$gnutls_prefix" != "yes" -+ then -+ LDFLAGS="$LDFLAGS -L$gnutls_prefix/lib" -+ CPPFLAGS="$CPPFLAGS -I$gnutls_prefix/include" -+ fi -+ saved_LIBS="$LIBS" -+ -+ AC_CHECK_LIB(gnutls, gnutls_check_version, - [dnl GNUTLS found -- CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" -- MUTTLIBS="$MUTTLIBS $LIBGNUTLS_LIBS" -- -- AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) -- AC_DEFINE(USE_SSL_GNUTLS,1,[ Define if you want support for SSL via GNUTLS. ]) -+ AC_CHECK_DECLS([GNUTLS_VERIFY_DISABLE_TIME_CHECKS], [], [], -+ [[#include <gnutls/x509.h>]]) -+ -+ LIBS="$saved_LIBS" -+ MUTTLIBS="$MUTTLIBS -lgnutls" -+ -+ AC_DEFINE(USE_SSL, 1, [ Define if you want support for SSL. ]) -+ AC_DEFINE(USE_SSL_GNUTLS, 1, [ Define if you want support for SSL via GNUTLS. ]) - - MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_ssl_gnutls.o" - need_ssl=yes], -- [dnl GNUTLS not found -- AC_MSG_ERROR([could not find libgnutls]) -- ]) -+ [AC_MSG_ERROR([could not find libgnutls])]) - fi - fi -+ - AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes) - -Index: 4/libgnutls.m4 -=================================================================== ---- m4/libgnutls.m4 (revision 3891:edccac2079c8) -+++ (revision ) -@@ -1,162 +1,0 @@ --dnl Autoconf macros for libgnutls --dnl $id$ -- --# Modified for mutt 20050210 Brendan Cully --# Modified for LIBGNUTLS -- nmav --# Configure paths for LIBGCRYPT --# Shamelessly stolen from the one of XDELTA by Owen Taylor --# Werner Koch 99-12-09 -- --dnl MUTT_AM_PATH_GNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) --dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS --dnl --AC_DEFUN([MUTT_AM_PATH_GNUTLS], --[dnl --dnl Get the cflags and libraries from the libgnutls-config script --dnl -- libgnutls_config_prefix=$1 -- min_libgnutls_version=0.1.0 -- -- if test x$libgnutls_config_prefix != x ; then -- if test x${LIBGNUTLS_CONFIG+set} != xset ; then -- LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config -- fi -- fi -- -- AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no) -- AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version) -- no_libgnutls="" -- if test "$LIBGNUTLS_CONFIG" = "no" ; then -- no_libgnutls=yes -- else -- LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags` -- LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` -- libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version` -- -- -- ac_save_CFLAGS="$CFLAGS" -- ac_save_LIBS="$LIBS" -- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" -- LIBS="$LIBS $LIBGNUTLS_LIBS" -- --dnl --dnl Now check if the installed libgnutls is sufficiently new. Also sanity --dnl checks the results of libgnutls-config to some extent --dnl -- rm -f conf.libgnutlstest -- AC_TRY_RUN([ --#include <stdio.h> --#include <stdlib.h> --#include <string.h> --#include <gnutls/gnutls.h> -- --int --main () --{ -- system ("touch conf.libgnutlstest"); -- -- if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) ) -- { -- printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n", -- "$libgnutls_config_version", gnutls_check_version(NULL) ); -- printf("*** was found! If libgnutls-config was correct, then it is best\n"); -- printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n"); -- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); -- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); -- printf("*** required on your system.\n"); -- printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n"); -- printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n"); -- printf("*** before re-running configure\n"); -- } -- else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) ) -- { -- printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION); -- printf("*** library (version %s)\n", gnutls_check_version(NULL) ); -- } -- else -- { -- if ( gnutls_check_version( "$min_libgnutls_version" ) ) -- { -- return 0; -- } -- else -- { -- printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n", -- gnutls_check_version(NULL) ); -- printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n", -- "$min_libgnutls_version" ); -- printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); -- printf("*** \n"); -- printf("*** If you have already installed a sufficiently new version, this error\n"); -- printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n"); -- printf("*** being found. The easiest way to fix this is to remove the old version\n"); -- printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n"); -- printf("*** correct copy of libgnutls-config. (In this case, you will have to\n"); -- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); -- printf("*** so that the correct libraries are found at run-time))\n"); -- } -- } -- return 1; --} --],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) -- CFLAGS="$ac_save_CFLAGS" -- LIBS="$ac_save_LIBS" -- fi -- -- if test "x$no_libgnutls" = x ; then -- AC_MSG_RESULT(yes) -- dnl some openssl compatibility code was moved in gnutls 1.2 -- AC_CHECK_HEADERS([gnutls/openssl.h]) -- ifelse([$2], , :, [$2]) -- else -- if test -f conf.libgnutlstest ; then -- : -- else -- AC_MSG_RESULT(no) -- fi -- if test "$LIBGNUTLS_CONFIG" = "no" ; then -- echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found" -- echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in" -- echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the" -- echo "*** full path to libgnutls-config." -- else -- if test -f conf.libgnutlstest ; then -- : -- else -- echo "*** Could not run libgnutls test program, checking why..." -- CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" -- LIBS="$LIBS $LIBGNUTLS_LIBS" -- AC_TRY_LINK([ --#include <stdio.h> --#include <stdlib.h> --#include <string.h> --#include <gnutls/gnutls.h> --], [ return !!gnutls_check_version(NULL); ], -- [ echo "*** The test program compiled, but did not run. This usually means" -- echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong" -- echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your" -- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" -- echo "*** to the installed location Also, make sure you have run ldconfig if that" -- echo "*** is required on your system" -- echo "***" -- echo "*** If you have an old version installed, it is best to remove it, although" -- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" -- echo "***" ], -- [ echo "*** The test program failed to compile or link. See the file config.log for the" -- echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed" -- echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you" -- echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ]) -- CFLAGS="$ac_save_CFLAGS" -- LIBS="$ac_save_LIBS" -- fi -- fi -- LIBGNUTLS_CFLAGS="" -- LIBGNUTLS_LIBS="" -- ifelse([$3], , :, [$3]) -- fi -- rm -f conf.libgnutlstest -- AC_SUBST(LIBGNUTLS_CFLAGS) -- AC_SUBST(LIBGNUTLS_LIBS) --]) -- --dnl *-*wedit:notab*-* Please keep this as the last line. diff --git a/mail-client/mutt/files/mutt-1.5.19-mutt-gnutls-7d0583e0315d-0b13183e40e0.patch b/mail-client/mutt/files/mutt-1.5.19-mutt-gnutls-7d0583e0315d-0b13183e40e0.patch deleted file mode 100644 index 56c138a49493..000000000000 --- a/mail-client/mutt/files/mutt-1.5.19-mutt-gnutls-7d0583e0315d-0b13183e40e0.patch +++ /dev/null @@ -1,452 +0,0 @@ -http://thread.gmane.org/gmane.comp.security.oss.general/1847 -http://bugs.gentoo.org/show_bug.cgi?id=274488 - -whitespace-only hunks removed -removed mutt_read_line change hunk, thanks Martin Jansa (bug #274603) - -Index: mutt_ssl_gnutls.c -=================================================================== ---- mutt_ssl_gnutls.c (revision 5623:7d0583e0315d) -+++ mutt_ssl_gnutls.c (revision 5853:0b13183e40e0) -@@ -34,4 +34,13 @@ - #include "mutt_regex.h" - -+/* certificate error bitmap values */ -+#define CERTERR_VALID 0 -+#define CERTERR_EXPIRED 1 -+#define CERTERR_NOTYETVALID 2 -+#define CERTERR_REVOKED 4 -+#define CERTERR_NOTTRUSTED 8 -+#define CERTERR_HOSTNAME 16 -+#define CERTERR_SIGNERNOTCA 32 -+ - typedef struct _tlssockdata - { -@@ -409,5 +418,5 @@ - - b64_data.size = fread(b64_data.data, 1, b64_data.size, fd1); -- fclose(fd1); -+ safe_fclose (&fd1); - - do { -@@ -518,5 +527,5 @@ - regfree(&preg); - FREE(&linestr); -- fclose(fp); -+ safe_fclose (&fp); - return 1; - } -@@ -526,9 +535,113 @@ - - regfree(&preg); -- fclose(fp); -+ safe_fclose (&fp); - } - - /* not found a matching name */ - return 0; -+} -+ -+static int tls_check_preauth (const gnutls_datum_t *certdata, -+ gnutls_certificate_status certstat, -+ const char *hostname, int chainidx, int* certerr, -+ int* savedcert) -+{ -+ gnutls_x509_crt cert; -+ -+ *certerr = CERTERR_VALID; -+ *savedcert = 0; -+ -+ if (gnutls_x509_crt_init (&cert) < 0) -+ { -+ mutt_error (_("Error initialising gnutls certificate data")); -+ mutt_sleep (2); -+ return -1; -+ } -+ -+ if (gnutls_x509_crt_import (cert, certdata, GNUTLS_X509_FMT_DER) < 0) -+ { -+ mutt_error (_("Error processing certificate data")); -+ mutt_sleep (2); -+ gnutls_x509_crt_deinit (cert); -+ return -1; -+ } -+ -+ if (option (OPTSSLVERIFYDATES) != M_NO) -+ { -+ if (gnutls_x509_crt_get_expiration_time (cert) < time(NULL)) -+ *certerr |= CERTERR_EXPIRED; -+ if (gnutls_x509_crt_get_activation_time (cert) > time(NULL)) -+ *certerr |= CERTERR_NOTYETVALID; -+ } -+ -+ if (chainidx == 0 && option (OPTSSLVERIFYHOST) != M_NO -+ && !gnutls_x509_crt_check_hostname (cert, hostname) -+ && !tls_check_stored_hostname (certdata, hostname)) -+ *certerr |= CERTERR_HOSTNAME; -+ -+ /* see whether certificate is in our cache (certificates file) */ -+ if (tls_compare_certificates (certdata)) -+ { -+ *savedcert = 1; -+ -+ if (chainidx == 0 && certstat & GNUTLS_CERT_INVALID) -+ { -+ /* doesn't matter - have decided is valid because server -+ certificate is in our trusted cache */ -+ certstat ^= GNUTLS_CERT_INVALID; -+ } -+ -+ if (chainidx == 0 && certstat & GNUTLS_CERT_SIGNER_NOT_FOUND) -+ { -+ /* doesn't matter that we haven't found the signer, since -+ certificate is in our trusted cache */ -+ certstat ^= GNUTLS_CERT_SIGNER_NOT_FOUND; -+ } -+ -+ if (chainidx <= 1 && certstat & GNUTLS_CERT_SIGNER_NOT_CA) -+ { -+ /* Hmm. Not really sure how to handle this, but let's say -+ that we don't care if the CA certificate hasn't got the -+ correct X.509 basic constraints if server or first signer -+ certificate is in our cache. */ -+ certstat ^= GNUTLS_CERT_SIGNER_NOT_CA; -+ } -+ } -+ -+ if (certstat & GNUTLS_CERT_REVOKED) -+ { -+ *certerr |= CERTERR_REVOKED; -+ certstat ^= GNUTLS_CERT_REVOKED; -+ } -+ -+ if (certstat & GNUTLS_CERT_INVALID) -+ { -+ *certerr |= CERTERR_NOTTRUSTED; -+ certstat ^= GNUTLS_CERT_INVALID; -+ } -+ -+ if (certstat & GNUTLS_CERT_SIGNER_NOT_FOUND) -+ { -+ /* NB: already cleared if cert in cache */ -+ *certerr |= CERTERR_NOTTRUSTED; -+ certstat ^= GNUTLS_CERT_SIGNER_NOT_FOUND; -+ } -+ -+ if (certstat & GNUTLS_CERT_SIGNER_NOT_CA) -+ { -+ /* NB: already cleared if cert in cache */ -+ *certerr |= CERTERR_SIGNERNOTCA; -+ certstat ^= GNUTLS_CERT_SIGNER_NOT_CA; -+ } -+ -+ gnutls_x509_crt_deinit (cert); -+ -+ /* we've been zeroing the interesting bits in certstat - -+ don't return OK if there are any unhandled bits we don't -+ understand */ -+ if (*certerr == CERTERR_VALID && certstat == 0) -+ return 0; -+ -+ return -1; - } - -@@ -537,11 +650,6 @@ - const char* hostname, int idx, int len) - { -+ int certerr, savedcert; - gnutls_x509_crt cert; -- int certerr_hostname = 0; -- int certerr_expired = 0; -- int certerr_notyetvalid = 0; -- int certerr_nottrusted = 0; -- int certerr_revoked = 0; -- int certerr_signernotca = 0; - char buf[SHORT_STRING]; - char fpbuf[SHORT_STRING]; -@@ -563,4 +671,9 @@ - int i, row, done, ret; - -+ if (!tls_check_preauth (certdata, certstat, hostname, idx, &certerr, -+ &savedcert)) -+ return 1; -+ -+ /* interactive check from user */ - if (gnutls_x509_crt_init (&cert) < 0) - { -@@ -569,5 +682,5 @@ - return 0; - } -- -+ - if (gnutls_x509_crt_import (cert, certdata, GNUTLS_X509_FMT_DER) < 0) - { -@@ -577,82 +690,5 @@ - return -1; - } -- -- if (gnutls_x509_crt_get_expiration_time (cert) < time(NULL)) -- certerr_expired = 1; -- if (gnutls_x509_crt_get_activation_time (cert) > time(NULL)) -- certerr_notyetvalid = 1; -- -- if (!idx) -- { -- if (!gnutls_x509_crt_check_hostname (cert, hostname) && -- !tls_check_stored_hostname (certdata, hostname)) -- certerr_hostname = 1; -- } -- -- /* see whether certificate is in our cache (certificates file) */ -- if (tls_compare_certificates (certdata)) -- { -- if (certstat & GNUTLS_CERT_INVALID) -- { -- /* doesn't matter - have decided is valid because server -- certificate is in our trusted cache */ -- certstat ^= GNUTLS_CERT_INVALID; -- } -- -- if (certstat & GNUTLS_CERT_SIGNER_NOT_FOUND) -- { -- /* doesn't matter that we haven't found the signer, since -- certificate is in our trusted cache */ -- certstat ^= GNUTLS_CERT_SIGNER_NOT_FOUND; -- } -- -- if (certstat & GNUTLS_CERT_SIGNER_NOT_CA) -- { -- /* Hmm. Not really sure how to handle this, but let's say -- that we don't care if the CA certificate hasn't got the -- correct X.509 basic constraints if server certificate is -- in our cache. */ -- certstat ^= GNUTLS_CERT_SIGNER_NOT_CA; -- } -- } -- -- if (certstat & GNUTLS_CERT_REVOKED) -- { -- certerr_revoked = 1; -- certstat ^= GNUTLS_CERT_REVOKED; -- } -- -- if (certstat & GNUTLS_CERT_INVALID) -- { -- certerr_nottrusted = 1; -- certstat ^= GNUTLS_CERT_INVALID; -- } -- -- if (certstat & GNUTLS_CERT_SIGNER_NOT_FOUND) -- { -- /* NB: already cleared if cert in cache */ -- certerr_nottrusted = 1; -- certstat ^= GNUTLS_CERT_SIGNER_NOT_FOUND; -- } -- -- if (certstat & GNUTLS_CERT_SIGNER_NOT_CA) -- { -- /* NB: already cleared if cert in cache */ -- certerr_signernotca = 1; -- certstat ^= GNUTLS_CERT_SIGNER_NOT_CA; -- } -- -- /* OK if signed by (or is) a trusted certificate */ -- /* we've been zeroing the interesting bits in certstat - -- don't return OK if there are any unhandled bits we don't -- understand */ -- if (!(certerr_expired || certerr_notyetvalid || -- certerr_hostname || certerr_nottrusted) && certstat == 0) -- { -- gnutls_x509_crt_deinit (cert); -- return 1; -- } -- -- /* interactive check from user */ -+ - menu = mutt_new_menu (-1); - menu->max = 25; -@@ -756,26 +792,26 @@ - tls_fingerprint (GNUTLS_DIG_MD5, fpbuf, sizeof (fpbuf), certdata); - snprintf (menu->dialog[row++], SHORT_STRING, _("MD5 Fingerprint: %s"), fpbuf); -- -- if (certerr_notyetvalid) -+ -+ if (certerr & CERTERR_NOTYETVALID) - { - row++; - strfcpy (menu->dialog[row], _("WARNING: Server certificate is not yet valid"), SHORT_STRING); - } -- if (certerr_expired) -+ if (certerr & CERTERR_EXPIRED) - { - row++; - strfcpy (menu->dialog[row], _("WARNING: Server certificate has expired"), SHORT_STRING); - } -- if (certerr_revoked) -+ if (certerr & CERTERR_REVOKED) - { - row++; - strfcpy (menu->dialog[row], _("WARNING: Server certificate has been revoked"), SHORT_STRING); - } -- if (certerr_hostname) -+ if (certerr & CERTERR_HOSTNAME) - { - row++; - strfcpy (menu->dialog[row], _("WARNING: Server hostname does not match certificate"), SHORT_STRING); - } -- if (certerr_signernotca) -+ if (certerr & CERTERR_SIGNERNOTCA) - { - row++; -@@ -789,5 +825,7 @@ - /* certificates with bad dates, or that are revoked, must be - accepted manually each and every time */ -- if (SslCertFile && !certerr_expired && !certerr_notyetvalid && !certerr_revoked) -+ if (SslCertFile && !savedcert -+ && !(certerr & (CERTERR_EXPIRED | CERTERR_NOTYETVALID -+ | CERTERR_REVOKED))) - { - menu->prompt = _("(r)eject, accept (o)nce, (a)ccept always"); -@@ -823,10 +861,10 @@ - { - /* save hostname if necessary */ -- if (certerr_hostname) -+ if (certerr & CERTERR_HOSTNAME) - { - fprintf(fp, "#H %s %s\n", hostname, fpbuf); - done = 1; - } -- if (certerr_nottrusted) -+ if (certerr & CERTERR_NOTTRUSTED) - { - done = 0; -@@ -842,5 +880,5 @@ - } - } -- fclose (fp); -+ safe_fclose (&fp); - } - if (!done) -@@ -867,4 +905,38 @@ - } - -+/* sanity-checking wrapper for gnutls_certificate_verify_peers */ -+static gnutls_certificate_status tls_verify_peers (gnutls_session tlsstate) -+{ -+ gnutls_certificate_status certstat; -+ -+ certstat = gnutls_certificate_verify_peers (tlsstate); -+ if (!certstat) -+ return certstat; -+ -+ if (certstat == GNUTLS_E_NO_CERTIFICATE_FOUND) -+ { -+ mutt_error (_("Unable to get certificate from peer")); -+ mutt_sleep (2); -+ return 0; -+ } -+ if (certstat < 0) -+ { -+ mutt_error (_("Certificate verification error (%s)"), -+ gnutls_strerror (certstat)); -+ mutt_sleep (2); -+ return 0; -+ } -+ -+ /* We only support X.509 certificates (not OpenPGP) at the moment */ -+ if (gnutls_certificate_type_get (tlsstate) != GNUTLS_CRT_X509) -+ { -+ mutt_error (_("Certificate is not X.509")); -+ mutt_sleep (2); -+ return 0; -+ } -+ -+ return certstat; -+} -+ - static int tls_check_certificate (CONNECTION* conn) - { -@@ -874,5 +946,5 @@ - unsigned int cert_list_size = 0; - gnutls_certificate_status certstat; -- int i, rc; -+ int certerr, i, preauthrc, savedcert, rc = 0; - - if (gnutls_auth_get_type (state) != GNUTLS_CRD_CERTIFICATE) -@@ -883,27 +955,5 @@ - } - -- certstat = gnutls_certificate_verify_peers (state); -- -- if (certstat == GNUTLS_E_NO_CERTIFICATE_FOUND) -- { -- mutt_error (_("Unable to get certificate from peer")); -- mutt_sleep (2); -- return 0; -- } -- if (certstat < 0) -- { -- mutt_error (_("Certificate verification error (%s)"), -- gnutls_strerror (certstat)); -- mutt_sleep (2); -- return 0; -- } -- -- /* We only support X.509 certificates (not OpenPGP) at the moment */ -- if (gnutls_certificate_type_get (state) != GNUTLS_CRT_X509) -- { -- mutt_error (_("Certificate is not X.509")); -- mutt_sleep (2); -- return 0; -- } -+ certstat = tls_verify_peers (state); - - cert_list = gnutls_certificate_get_peers (state, &cert_list_size); -@@ -915,12 +965,41 @@ - } - -+ /* tls_verify_peers doesn't check hostname or expiration, so walk -+ * from most specific to least checking these. If we see a saved certificate, -+ * its status short-circuits the remaining checks. */ -+ preauthrc = 0; -+ for (i = 0; i < cert_list_size; i++) { -+ rc = tls_check_preauth(&cert_list[i], certstat, conn->account.host, i, -+ &certerr, &savedcert); -+ preauthrc += rc; -+ -+ if (savedcert) -+ { -+ if (!preauthrc) -+ return 1; -+ else -+ break; -+ } -+ } -+ -+ /* then check interactively, starting from chain root */ - for (i = cert_list_size - 1; i >= 0; i--) - { - rc = tls_check_one_certificate (&cert_list[i], certstat, conn->account.host, - i, cert_list_size); -- if (rc) -- return rc; -- } -- -- return 0; --} -+ -+ /* add signers to trust set, then reverify */ -+ if (i && rc) { -+ rc = gnutls_certificate_set_x509_trust_mem (data->xcred, &cert_list[i], -+ GNUTLS_X509_FMT_DER); -+ if (rc != 1) -+ dprint (1, (debugfile, "error trusting certificate %d: %d\n", i, rc)); -+ -+ certstat = tls_verify_peers (state); -+ if (!certstat) -+ return 1; -+ } -+ } -+ -+ return rc; -+} diff --git a/mail-client/mutt/files/mutt-1.5.19-mutt_ssl-3af7e8af1983-dc9ec900c657.patch b/mail-client/mutt/files/mutt-1.5.19-mutt_ssl-3af7e8af1983-dc9ec900c657.patch deleted file mode 100644 index cdeea565d19b..000000000000 --- a/mail-client/mutt/files/mutt-1.5.19-mutt_ssl-3af7e8af1983-dc9ec900c657.patch +++ /dev/null @@ -1,214 +0,0 @@ -http://thread.gmane.org/gmane.comp.security.oss.general/1847 -http://bugs.gentoo.org/show_bug.cgi?id=274488 - -whitespace-only hunks removed - -Index: init.h -=================================================================== ---- init.h (revision 5639:e3af935cdb1a) -+++ init.h (revision 5665:b6b37a6a7f72) -@@ -2145,4 +2145,20 @@ - ** advertising the capability. When \fIunset\fP, mutt will not attempt to - ** use \fCSTARTTLS\fP regardless of the server's capabilities. -+ */ -+ { "ssl_verify_dates", DT_BOOL, R_NONE, OPTSSLVERIFYDATES, M_YES }, -+ /* -+ ** .pp -+ ** If \fIset\fP (the default), mutt will not automatically accept a server -+ ** certificate that is either not yet valid or already expired. You should -+ ** only unset this for particular known hosts, using the -+ ** \fC$<account-hook>\fP function. -+ */ -+ { "ssl_verify_host", DT_BOOL, R_NONE, OPTSSLVERIFYHOST, M_YES }, -+ /* -+ ** .pp -+ ** If \fIset\fP (the default), mutt will not automatically accept a server -+ ** certificate whose host name does not match the host used in your folder -+ ** URL. You should only unset this for particular known hosts, using -+ ** the \fC$<account-hook>\fP function. - */ - { "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" }, -Index: mutt.h -=================================================================== ---- mutt.h (revision 5535:2050b44407bf) -+++ mutt.h (revision 5665:b6b37a6a7f72) -@@ -371,4 +371,6 @@ - OPTTLSV1, - OPTSSLFORCETLS, -+ OPTSSLVERIFYDATES, -+ OPTSSLVERIFYHOST, - #endif /* defined(USE_SSL) */ - OPTIMPLICITAUTOVIEW, -Index: mutt_ssl.c -=================================================================== ---- mutt_ssl.c (revision 5622:3af7e8af1983) -+++ mutt_ssl.c (revision 5870:dc9ec900c657) -@@ -565,17 +565,20 @@ - - /* expiration check */ -- if (X509_cmp_current_time (X509_get_notBefore (peercert)) >= 0) -- { -- dprint (2, (debugfile, "Server certificate is not yet valid\n")); -- mutt_error (_("Server certificate is not yet valid")); -- mutt_sleep (2); -- return 0; -- } -- if (X509_cmp_current_time (X509_get_notAfter (peercert)) <= 0) -- { -- dprint (2, (debugfile, "Server certificate has expired")); -- mutt_error (_("Server certificate has expired")); -- mutt_sleep (2); -- return 0; -+ if (option (OPTSSLVERIFYDATES) != M_NO) -+ { -+ if (X509_cmp_current_time (X509_get_notBefore (peercert)) >= 0) -+ { -+ dprint (2, (debugfile, "Server certificate is not yet valid\n")); -+ mutt_error (_("Server certificate is not yet valid")); -+ mutt_sleep (2); -+ return 0; -+ } -+ if (X509_cmp_current_time (X509_get_notAfter (peercert)) <= 0) -+ { -+ dprint (2, (debugfile, "Server certificate has expired")); -+ mutt_error (_("Server certificate has expired")); -+ mutt_sleep (2); -+ return 0; -+ } - } - -@@ -585,5 +588,5 @@ - if (!X509_digest (peercert, EVP_sha1(), peermd, &peermdlen)) - { -- fclose (fp); -+ safe_fclose (&fp); - return 0; - } -@@ -592,10 +595,10 @@ - { - pass = compare_certificates (cert, peercert, peermd, peermdlen) ? 0 : 1; -- -+ - if (pass) - break; - } - X509_free (cert); -- fclose (fp); -+ safe_fclose (&fp); - - return pass; -@@ -737,6 +740,8 @@ - } - --/* check whether cert is preauthorized */ --static int ssl_check_preauth (X509 *cert, CONNECTION *conn) -+/* check whether cert is preauthorized. If host is not null, verify that -+ * it matches the certificate. -+ * Return > 0: authorized, < 0: problems, 0: unknown validity */ -+static int ssl_check_preauth (X509 *cert, const char* host) - { - char buf[SHORT_STRING]; -@@ -750,11 +755,14 @@ - - buf[0] = 0; -- if (!check_host (cert, conn->account.host, buf, sizeof (buf))) -- { -- mutt_error (_("Certificate host check failed: %s"), buf); -- mutt_sleep (2); -- return -1; -- } -- dprint (2, (debugfile, "ssl_check_preauth: hostname check passed\n")); -+ if (host && option (OPTSSLVERIFYHOST) != M_NO) -+ { -+ if (!check_host (cert, host, buf, sizeof (buf))) -+ { -+ mutt_error (_("Certificate host check failed: %s"), buf); -+ mutt_sleep (2); -+ return -1; -+ } -+ dprint (2, (debugfile, "ssl_check_preauth: hostname check passed\n")); -+ } - - if (check_certificate_by_signer (cert)) -@@ -780,42 +788,28 @@ - X509 *cert; - -- if ((preauthrc = ssl_check_preauth (data->cert, conn)) > 0) -+ if ((preauthrc = ssl_check_preauth (data->cert, conn->account.host)) > 0) - return preauthrc; - - chain = SSL_get_peer_cert_chain (data->ssl); - chain_len = sk_X509_num (chain); -- if (!chain || (chain_len < 1)) -+ /* negative preauthrc means the certificate won't be accepted without -+ * manual override. */ -+ if (preauthrc < 0 || !chain || (chain_len <= 1)) - return interactive_check_cert (data->cert, 0, 0); - -- /* check the chain from root to peer */ -+ /* check the chain from root to peer. */ - for (i = chain_len-1; i >= 0; i--) - { - cert = sk_X509_value (chain, i); -- if (check_certificate_cache (cert)) -- dprint (2, (debugfile, "ssl chain: already cached: %s\n", cert->name)); -- else if (i /* 0 is the peer */ || !preauthrc) -- { -- if (check_certificate_by_signer (cert)) -- { -- dprint (2, (debugfile, "ssl chain: checked by signer: %s\n", cert->name)); -- ssl_cache_trusted_cert (cert); -+ -+ /* if the certificate validates or is manually accepted, then add it to -+ * the trusted set and recheck the peer certificate */ -+ if (ssl_check_preauth (cert, NULL) -+ || interactive_check_cert (cert, i, chain_len)) -+ { -+ ssl_cache_trusted_cert (cert); -+ if (ssl_check_preauth (data->cert, conn->account.host)) - return 1; -- } -- else if (SslCertFile && check_certificate_by_digest (cert)) -- { -- dprint (2, (debugfile, "ssl chain: trusted with file: %s\n", cert->name)); -- ssl_cache_trusted_cert (cert); -- return 1; -- } -- else /* allow users to shoot their foot */ -- { -- dprint (2, (debugfile, "ssl chain: check failed: %s\n", cert->name)); -- if (interactive_check_cert (cert, i, chain_len)) -- return 1; -- } -- } -- else /* highly suspicious because (i==0 && preauthrc < 0) */ -- if (interactive_check_cert (cert, i, chain_len)) -- return 1; -+ } - } - -@@ -882,6 +876,8 @@ - len - idx, len); - menu->title = title; -- if (SslCertFile && X509_cmp_current_time (X509_get_notAfter (cert)) >= 0 -- && X509_cmp_current_time (X509_get_notBefore (cert)) < 0) -+ if (SslCertFile -+ && (option (OPTSSLVERIFYDATES) == M_NO -+ || (X509_cmp_current_time (X509_get_notAfter (cert)) >= 0 -+ && X509_cmp_current_time (X509_get_notBefore (cert)) < 0))) - { - menu->prompt = _("(r)eject, accept (o)nce, (a)ccept always"); -@@ -893,5 +889,5 @@ - menu->keys = _("ro"); - } -- -+ - helpstr[0] = '\0'; - mutt_make_help (buf, sizeof (buf), _("Exit "), MENU_GENERIC, OP_EXIT); -@@ -918,5 +914,5 @@ - if (PEM_write_X509 (fp, cert)) - done = 1; -- fclose (fp); -+ safe_fclose (&fp); - } - if (!done) diff --git a/mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch b/mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch deleted file mode 100644 index 64c1e3a639b4..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-abort-prompt-ctrlc-c837ab790d2e.patch +++ /dev/null @@ -1,19 +0,0 @@ -http://dev.mutt.org/trac/changeset/c837ab790d2e -http://dev.mutt.org/trac/ticket/1860 - -Abort prompt on ^C, as was the case prior to 12a6de725483 - - -Index: curs_lib.c -=================================================================== ---- curs_lib.c (revision 5981:cff8e8ce4327) -+++ curs_lib.c (revision 6010:c837ab790d2e) -@@ -99,5 +99,8 @@ - - if (SigInt) -+ { - mutt_query_exit (); -+ return err; -+ } - - if(ch == ERR) diff --git a/mail-client/mutt/files/mutt-1.5.20-copy-From-to-imap-b2b97c7a2ae6.patch b/mail-client/mutt/files/mutt-1.5.20-copy-From-to-imap-b2b97c7a2ae6.patch deleted file mode 100644 index f6e24fc75447..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-copy-From-to-imap-b2b97c7a2ae6.patch +++ /dev/null @@ -1,72 +0,0 @@ -http://dev.mutt.org/trac/changeset/b2b97c7a2ae6 -http://dev.mutt.org/trac/ticket/3381 - -Set internaldate of messages appended to IMAP mailboxes - - -Index: imap/imap_private.h -=================================================================== ---- imap/imap_private.h (revision 5661:b1488cf4f14c) -+++ imap/imap_private.h (revision 5949:b2b97c7a2ae6) -@@ -70,4 +70,7 @@ - #define IMAP_CMD_PASS (1<<1) - #define IMAP_CMD_QUEUE (1<<2) -+ -+/* length of "DD-MMM-YYYY HH:MM:SS +ZZzz" (null-terminated) */ -+#define IMAP_DATELEN 27 - - enum -@@ -282,4 +285,5 @@ - char* imap_next_word (char* s); - time_t imap_parse_date (char* s); -+void imap_make_date (char* buf, time_t timestamp); - void imap_qualify_path (char *dest, size_t len, IMAP_MBOX *mx, char* path); - void imap_quote_string (char* dest, size_t slen, const char* src); -Index: imap/message.c -=================================================================== ---- imap/message.c (revision 5930:ed7eb5de7536) -+++ imap/message.c (revision 5949:b2b97c7a2ae6) -@@ -595,4 +595,5 @@ - char mbox[LONG_STRING]; - char mailbox[LONG_STRING]; -+ char internaldate[IMAP_DATELEN]; - size_t len; - progress_t progressbar; -@@ -636,5 +637,6 @@ - - imap_munge_mbox_name (mbox, sizeof (mbox), mailbox); -- snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) {%lu}", mbox, -+ imap_make_date (internaldate, msg->received); -+ snprintf (buf, sizeof (buf), "APPEND %s (%s%s%s%s%s) \"%s\" {%lu}", mbox, - msg->flags.read ? "\\Seen" : "", - msg->flags.read && (msg->flags.replied || msg->flags.flagged) ? " " : "", -@@ -642,4 +644,5 @@ - msg->flags.replied && msg->flags.flagged ? " " : "", - msg->flags.flagged ? "\\Flagged" : "", -+ internaldate, - (unsigned long) len); - -Index: imap/util.c -=================================================================== ---- imap/util.c (revision 5867:0fb94d6eee38) -+++ imap/util.c (revision 5949:b2b97c7a2ae6) -@@ -578,4 +578,19 @@ - } - -+/* format date in IMAP style: DD-MMM-YYYY HH:MM:SS +ZZzz. -+ * Caller should provide a buffer of IMAP_DATELEN bytes */ -+void imap_make_date (char *buf, time_t timestamp) -+{ -+ struct tm* tm = localtime (×tamp); -+ time_t tz = mutt_local_tz (timestamp); -+ -+ tz /= 60; -+ -+ snprintf (buf, IMAP_DATELEN, "%02d-%s-%d %02d:%02d:%02d %+03d%02d", -+ tm->tm_mday, Months[tm->tm_mon], tm->tm_year + 1900, -+ tm->tm_hour, tm->tm_min, tm->tm_sec, -+ (int) tz / 60, (int) abs (tz) % 60); -+} -+ - /* imap_qualify_path: make an absolute IMAP folder target, given IMAP_MBOX - * and relative path. */ diff --git a/mail-client/mutt/files/mutt-1.5.20-display-unsigned-pgp-7f37d0a57d83.patch b/mail-client/mutt/files/mutt-1.5.20-display-unsigned-pgp-7f37d0a57d83.patch deleted file mode 100644 index 4e32011591de..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-display-unsigned-pgp-7f37d0a57d83.patch +++ /dev/null @@ -1,45 +0,0 @@ -http://dev.mutt.org/trac/changeset/5908%3A7f37d0a57d83?format=diff&new=5908:7f37d0a57d83 - -Display unsigned part of traditional PGP messages. -Unbreaks [e2780a423d96], closes #3269 - -Index: crypt-gpgme.c -=================================================================== ---- crypt-gpgme.c (revision 5801:19e62bd1549b) -+++ crypt-gpgme.c (revision 5908:7f37d0a57d83) -@@ -2372,8 +2372,7 @@ - } - } --#if 0 - else - { -- /* why would we want to display this at all? */ -+ /* A traditional PGP part may mix signed and unsigned content */ - /* XXX - we may wish to recode here */ - if (s->prefix) -@@ -2381,5 +2380,4 @@ - state_puts (buf, s); - } --#endif - } - -Index: pgp.c -=================================================================== ---- pgp.c (revision 5827:776ef9dbe4d2) -+++ pgp.c (revision 5908:7f37d0a57d83) -@@ -483,8 +483,7 @@ - } - } --#if 0 - else - { -- /* why would we want to display this at all? */ -+ /* A traditional PGP part may mix signed and unsigned content */ - /* XXX - we may wish to recode here */ - if (s->prefix) -@@ -492,5 +491,4 @@ - state_puts (buf, s); - } --#endif - } - diff --git a/mail-client/mutt/files/mutt-1.5.20-fix-mh-parsing-14bb498c6a1c.patch b/mail-client/mutt/files/mutt-1.5.20-fix-mh-parsing-14bb498c6a1c.patch deleted file mode 100644 index b0a390f2f262..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-fix-mh-parsing-14bb498c6a1c.patch +++ /dev/null @@ -1,16 +0,0 @@ -http://dev.mutt.org/trac/ticket/3312 -http://dev.mutt.org/trac/changeset/14bb498c6a1c - -Fix MH parsing, fixes [0698e8195545]. Closes #3312 - -Index: mh.c -=================================================================== ---- mh.c (revision 5999:2fc9348684fe) -+++ mh.c (revision 6005:14bb498c6a1c) -@@ -147,5 +147,5 @@ - { - *p++ = '\0'; -- if (mutt_atoi (t, first) < 0 || mutt_atoi (t, last) < 0) -+ if (mutt_atoi (t, first) < 0 || mutt_atoi (p, last) < 0) - return -1; - } diff --git a/mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch b/mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch deleted file mode 100644 index d809fcd303b7..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-gpgme-case-insensitive-domain-2c78b28027cc.patch +++ /dev/null @@ -1,100 +0,0 @@ -http://dev.mutt.org/trac/changeset/2c78b28027cc -http://dev.mutt.org/trac/ticket/2180 - -GPGME: Sender verification should be canse-insensitive for domain names. -Closes #2180 - -Index: crypt-gpgme.c -=================================================================== ---- crypt-gpgme.c (revision 5935:f5849c72a274) -+++ crypt-gpgme.c (revision 6047:2c78b28027cc) -@@ -4483,35 +4483,64 @@ - - if (sender) -- { -- if (signature_key) -+ { -+ if (signature_key) -+ { -+ gpgme_key_t key = signature_key; -+ gpgme_user_id_t uid = NULL; -+ int sender_length = 0; -+ int uid_length = 0; -+ -+ sender_length = strlen (sender->mailbox); -+ for (uid = key->uids; uid && ret; uid = uid->next) -+ { -+ uid_length = strlen (uid->email); -+ if (1 -+ && (uid->email[0] == '<') -+ && (uid->email[uid_length - 1] == '>') -+ && (uid_length == sender_length + 2)) - { -- gpgme_key_t key = signature_key; -- gpgme_user_id_t uid = NULL; -- int sender_length = 0; -- int uid_length = 0; -- -- sender_length = strlen (sender->mailbox); -- for (uid = key->uids; uid && ret; uid = uid->next) -- { -- uid_length = strlen (uid->email); -- if (1 -- && (uid->email[0] == '<') -- && (uid->email[uid_length - 1] == '>') -- && (uid_length == sender_length + 2) -- && (! strncmp (uid->email + 1, sender->mailbox, sender_length))) -- ret = 0; -- } -+ const char* at_sign = strchr(uid->email + 1, '@'); -+ if (at_sign == NULL) -+ { -+ if (! strncmp (uid->email + 1, sender->mailbox, sender_length)) -+ ret = 0; -+ } -+ else -+ { -+ /* -+ * Assume address is 'mailbox@domainname'. -+ * The mailbox part is case-sensitive, -+ * the domainname is not. (RFC 2821) -+ */ -+ const char* tmp_email = uid->email + 1; -+ const char* tmp_sender = sender->mailbox; -+ /* length of mailbox part including '@' */ -+ int mailbox_length = at_sign - tmp_email + 1; -+ int domainname_length = sender_length - mailbox_length; -+ int mailbox_match, domainname_match; -+ -+ mailbox_match = (! strncmp (tmp_email, tmp_sender, -+ mailbox_length)); -+ tmp_email += mailbox_length; -+ tmp_sender += mailbox_length; -+ domainname_match = (! strncasecmp (tmp_email, tmp_sender, -+ domainname_length)); -+ if (mailbox_match && domainname_match) -+ ret = 0; -+ } - } -- else -- mutt_any_key_to_continue (_("Failed to verify sender")); -- } -+ } -+ } -+ else -+ mutt_any_key_to_continue (_("Failed to verify sender")); -+ } - else - mutt_any_key_to_continue (_("Failed to figure out sender")); - - if (signature_key) -- { -- gpgme_key_release (signature_key); -- signature_key = NULL; -- } -+ { -+ gpgme_key_release (signature_key); -+ signature_key = NULL; -+ } - - return ret; diff --git a/mail-client/mutt/files/mutt-1.5.20-gpgme-keys-d41e043fa775.patch b/mail-client/mutt/files/mutt-1.5.20-gpgme-keys-d41e043fa775.patch deleted file mode 100644 index f3e7f1f7666c..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-gpgme-keys-d41e043fa775.patch +++ /dev/null @@ -1,19 +0,0 @@ -# HG changeset patch -# User Fabian Groffen <grobian@gentoo.org> -# Date 1248269159 -7200 -# Node ID d41e043fa7751bc0c82ecb767d756aa228f56db9 -# Parent 848f08512bf303292a8068d3fa074fda73edacd6 -Use CRYPT_BACKEND_GPGME instead of non-existent HAVE_GPGME - ---- a/keymap.c Wed Jul 22 14:43:48 2009 +0200 -+++ b/keymap.c Wed Jul 22 15:25:59 2009 +0200 -@@ -47,7 +47,7 @@ - { "postpone", MENU_POST }, - { "pgp", MENU_PGP }, - { "smime", MENU_SMIME }, --#ifdef HAVE_GPGME -+#ifdef CRYPT_BACKEND_GPGME - { "key_select_pgp", MENU_KEY_SELECT_PGP }, - { "key_select_smime", MENU_KEY_SELECT_SMIME }, - #endif - diff --git a/mail-client/mutt/files/mutt-1.5.20-hcache-restore-address-848f08512bf3.patch b/mail-client/mutt/files/mutt-1.5.20-hcache-restore-address-848f08512bf3.patch deleted file mode 100644 index ce4af462d92f..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-hcache-restore-address-848f08512bf3.patch +++ /dev/null @@ -1,41 +0,0 @@ -http://dev.mutt.org/trac/changeset/848f08512bf3 -http://dev.mutt.org/trac/ticket/3302 - -Properly restore addresses from hcache using rfc822_new_address(). -Closes #3302. (valgrind complaining about ADDRESS.idn_checked) - -Index: hcache.c -=================================================================== ---- hcache.c (revision 5977:f161c2f00d84) -+++ hcache.c (revision 5986:848f08512bf3) -@@ -46,4 +46,5 @@ - #include "lib.h" - #include "md5.h" -+#include "rfc822.h" - - #if HAVE_QDBM -@@ -232,5 +233,5 @@ - while (counter) - { -- *a = safe_malloc(sizeof (ADDRESS)); -+ *a = rfc822_new_address(); - #ifdef EXACT_ADDRESS - restore_char(&(*a)->val, d, off, convert); -Index: rfc822.h -=================================================================== ---- rfc822.h (revision 5801:19e62bd1549b) -+++ rfc822.h (revision 5986:848f08512bf3) -@@ -19,4 +19,6 @@ - #ifndef rfc822_h - #define rfc822_h -+ -+#include "lib.h" - - /* possible values for RFC822Error */ -@@ -61,5 +63,5 @@ - - #define rfc822_error(x) RFC822Errors[x] --#define rfc822_new_address() calloc(1,sizeof(ADDRESS)) -+#define rfc822_new_address() safe_calloc(1,sizeof(ADDRESS)) - - #endif /* rfc822_h */ diff --git a/mail-client/mutt/files/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch b/mail-client/mutt/files/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch deleted file mode 100644 index a2d4c1efc8cf..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-hcache-uidvalidity-size-fix-a2a4286491b4.patch +++ /dev/null @@ -1,72 +0,0 @@ -http://dev.mutt.org/trac/changeset/a2a4286491b4 -http://dev.mutt.org/trac/ticket/3296 - -Harmonize hcache uidvalidity size to unsigned int (per IMAP RFC). -Closes #3296. - - -Index: hcache.c -=================================================================== ---- hcache.c (revision 5986:848f08512bf3) -+++ hcache.c (revision 6002:a2a4286491b4) -@@ -87,5 +87,5 @@ - { - struct timeval timeval; -- unsigned long uid_validity; -+ unsigned int uidvalidity; - } validate; - -@@ -590,5 +590,5 @@ - static void * - mutt_hcache_dump(header_cache_t *h, HEADER * header, int *off, -- unsigned long uid_validity) -+ unsigned int uidvalidity) - { - unsigned char *d = NULL; -@@ -599,6 +599,6 @@ - d = lazy_malloc(sizeof (validate)); - -- if (uid_validity) -- memcpy(d, &uid_validity, sizeof (unsigned long)); -+ if (uidvalidity) -+ memcpy(d, &uidvalidity, sizeof (uidvalidity)); - else - { -@@ -759,5 +759,5 @@ - int - mutt_hcache_store(header_cache_t *h, const char *filename, HEADER * header, -- unsigned long uid_validity, -+ unsigned int uidvalidity, - size_t(*keylen) (const char *fn)) - { -@@ -769,5 +769,5 @@ - return -1; - -- data = mutt_hcache_dump(h, header, &dlen, uid_validity); -+ data = mutt_hcache_dump(h, header, &dlen, uidvalidity); - ret = mutt_hcache_store_raw (h, filename, data, dlen, keylen); - -Index: hcache.h -=================================================================== ---- hcache.h (revision 5224:010084b62288) -+++ hcache.h (revision 6002:a2a4286491b4) -@@ -34,6 +34,7 @@ - void *mutt_hcache_fetch_raw (header_cache_t *h, const char *filename, - size_t (*keylen)(const char *fn)); -+/* uidvalidity is an IMAP-specific unsigned 32 bit number */ - int mutt_hcache_store(header_cache_t *h, const char *filename, HEADER *header, -- unsigned long uid_validity, size_t (*keylen)(const char *fn)); -+ unsigned int uidvalidity, size_t (*keylen)(const char *fn)); - int mutt_hcache_store_raw (header_cache_t *h, const char* filename, void* data, - size_t dlen, size_t(*keylen) (const char* fn)); -Index: imap/util.c -=================================================================== ---- imap/util.c (revision 5957:ecea9568202f) -+++ imap/util.c (revision 6002:a2a4286491b4) -@@ -130,4 +130,6 @@ - if (*uv == idata->uid_validity) - h = mutt_hcache_restore ((unsigned char*)uv, NULL); -+ else -+ dprint (3, (debugfile, "hcache uidvalidity mismatch: %u", *uv)); - FREE (&uv); - } diff --git a/mail-client/mutt/files/mutt-1.5.20-header-weeding-f40de578e8ed.patch b/mail-client/mutt/files/mutt-1.5.20-header-weeding-f40de578e8ed.patch deleted file mode 100644 index 710601f0080b..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-header-weeding-f40de578e8ed.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://dev.mutt.org/trac/changeset/5904%3Af40de578e8ed - -Unbreak header weeding for message/rfc822 parts. Closes #3265. - -Index: handler.c -=================================================================== ---- handler.c (revision 5882:536771b4e085) -+++ handler.c (revision 5904:f40de578e8ed) -@@ -1091,5 +1091,5 @@ - (((s->flags & M_WEED) || ((s->flags & (M_DISPLAY|M_PRINTING)) && option (OPTWEED))) ? (CH_WEED | CH_REORDER) : 0) | - (s->prefix ? CH_PREFIX : 0) | CH_DECODE | CH_FROM | -- (s->flags & M_DISPLAY) ? CH_DISPLAY : 0, s->prefix); -+ ((s->flags & M_DISPLAY) ? CH_DISPLAY : 0), s->prefix); - - if (s->prefix) diff --git a/mail-client/mutt/files/mutt-1.5.20-imap-port-invalid-d6f88fbf8387.patch b/mail-client/mutt/files/mutt-1.5.20-imap-port-invalid-d6f88fbf8387.patch deleted file mode 100644 index 19ae6885f177..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-imap-port-invalid-d6f88fbf8387.patch +++ /dev/null @@ -1,20 +0,0 @@ -http://dev.mutt.org/trac/changeset/5899%3Ad6f88fbf8387 - -Don't parse URL port as signed short, but to int and cast to unsigned -short. Closes #3264. - -Index: url.c -=================================================================== ---- url.c (revision 5845:0698e8195545) -+++ url.c (revision 5899:d6f88fbf8387) -@@ -144,7 +144,9 @@ - if ((p = strchr (t, ':'))) - { -+ int t; - *p++ = '\0'; -- if (mutt_atos (p, (short*) &ciss->port) < 0) -+ if (mutt_atoi (p, &t) < 0 || t < 0 || t > 0xffff) - return NULL; -+ ciss->port = (unsigned short)t; - } - else diff --git a/mail-client/mutt/files/mutt-1.5.20-imap-start-fatal-fe30f394cbe6.patch b/mail-client/mutt/files/mutt-1.5.20-imap-start-fatal-fe30f394cbe6.patch deleted file mode 100644 index 2bb44517b218..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-imap-start-fatal-fe30f394cbe6.patch +++ /dev/null @@ -1,17 +0,0 @@ -http://dev.mutt.org/trac/changeset/fe30f394cbe6 - -Not being able to start an IMAP command is a fatal error. -Closes #3155. - -Index: imap/command.c -=================================================================== ---- imap/command.c (revision 5651:aac0c04727c0) -+++ imap/command.c (revision 5955:fe30f394cbe6) -@@ -234,7 +234,4 @@ - - if ((rc = cmd_start (idata, cmdstr, flags)) < 0) -- return rc; -- -- if (rc < 0) - { - cmd_handle_fatal (idata); diff --git a/mail-client/mutt/files/mutt-1.5.20-leave-mailbox-no-new-mail-118b8fef8aae.patch b/mail-client/mutt/files/mutt-1.5.20-leave-mailbox-no-new-mail-118b8fef8aae.patch deleted file mode 100644 index b9088e727766..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-leave-mailbox-no-new-mail-118b8fef8aae.patch +++ /dev/null @@ -1,86 +0,0 @@ -http://dev.mutt.org/trac/changeset/118b8fef8aae -http://dev.mutt.org/trac/ticket/3290 - -Suppress new mail notification from mailbox just left. Closes #3290. - - -Index: buffy.c -=================================================================== ---- buffy.c (revision 5914:25e46aad362b) -+++ buffy.c (revision 5973:118b8fef8aae) -@@ -45,4 +45,6 @@ - static short BuffyCount = 0; /* how many boxes with new mail */ - static short BuffyNotify = 0; /* # of unnotified new boxes */ -+ -+static BUFFY* buffy_get (const char *path); - - /* Find the last message in the file. -@@ -498,4 +500,15 @@ - } - -+void mutt_buffy_setnotified (const char *path) -+{ -+ BUFFY *buffy; -+ -+ buffy = buffy_get(path); -+ if (!buffy) -+ return; -+ -+ buffy->notified = 1; -+} -+ - int mutt_buffy_notify (void) - { -@@ -542,2 +555,29 @@ - *s = '\0'; - } -+ -+/* fetch buffy object for given path, if present */ -+static BUFFY* buffy_get (const char *path) -+{ -+ BUFFY *cur; -+ char *epath; -+ -+ if (!path) -+ return NULL; -+ -+ epath = safe_strdup(path); -+ mutt_expand_path(epath, mutt_strlen(epath)); -+ -+ for (cur = Incoming; cur; cur = cur->next) -+ { -+ /* must be done late because e.g. IMAP delimiter may change */ -+ mutt_expand_path (cur->path, sizeof (cur->path)); -+ if (!mutt_strcmp(cur->path, path)) -+ { -+ FREE (&epath); -+ return cur; -+ } -+ } -+ -+ FREE (&epath); -+ return NULL; -+} -Index: buffy.h -=================================================================== ---- buffy.h (revision 5779:7bc332ddd8fc) -+++ buffy.h (revision 5973:118b8fef8aae) -@@ -44,2 +44,5 @@ - according to stat() info taken before a modification */ - void mutt_buffy_cleanup (const char *buf, struct stat *st); -+ -+/* mark mailbox just left as already notified */ -+void mutt_buffy_setnotified (const char *path); -Index: mx.c -=================================================================== ---- mx.c (revision 5930:ed7eb5de7536) -+++ mx.c (revision 5973:118b8fef8aae) -@@ -706,4 +706,8 @@ - return; - -+ /* never announce that a mailbox we've just left has new mail. #3290 -+ * XXX: really belongs in mx_close_mailbox, but this is a nice hook point */ -+ mutt_buffy_setnotified(ctx->path); -+ - if (ctx->mx_close) - ctx->mx_close (ctx); diff --git a/mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch b/mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch deleted file mode 100644 index 6f0f2e7d8f8d..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-mailbox-save-message-double-free-57124ea5592e.patch +++ /dev/null @@ -1,22 +0,0 @@ - -# HG changeset patch -# User Brendan Cully <brendan@kublai.com> -# Date 1266957745 28800 -# Node ID 57124ea5592ee350af277b543bfedf04d3cd0ace -# Parent f17302c1022979c654170a0ca0f5a4cc8ffd9eb5 -Don't use freed ctx.path when updating utime of target mailbox in save-message. -Thanks to Sean Boudreau for the bug report. - -diff -r f17302c10229 -r 57124ea5592e commands.c ---- a/commands.c Mon Feb 22 23:01:39 2010 -0800 -+++ b/commands.c Tue Feb 23 12:42:25 2010 -0800 -@@ -863,7 +863,7 @@ - mx_close_mailbox (&ctx, NULL); - - if (need_buffy_cleanup) -- mutt_buffy_cleanup (ctx.path, &st); -+ mutt_buffy_cleanup (buf, &st); - - mutt_clear_error (); - return (0); - diff --git a/mail-client/mutt/files/mutt-1.5.20-mbox-new-mail-bd59be56c6b0.patch b/mail-client/mutt/files/mutt-1.5.20-mbox-new-mail-bd59be56c6b0.patch deleted file mode 100644 index b06c506fe85e..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-mbox-new-mail-bd59be56c6b0.patch +++ /dev/null @@ -1,89 +0,0 @@ -http://dev.mutt.org/trac/changeset/bd59be56c6b0 - -Don't mangle atime/mtime for mbox folders without new mail upon sync. -Closes #1362, #3271. - -Index: mbox.c -=================================================================== ---- mbox.c (revision 5916:508bfe4a2e23) -+++ mbox.c (revision 5921:bd59be56c6b0) -@@ -682,20 +682,28 @@ - /* if mailbox has at least 1 new message, sets mtime > atime of mailbox - * so buffy check reports new mail */ --static void reset_atime (CONTEXT *ctx) -+static void reset_atime (CONTEXT *ctx, struct stat *st) - { - struct utimbuf utimebuf; -- int i; -- time_t now = time (NULL); -- -- for (i = 0; i < ctx->msgcount; i++) -- { -+ int i, found = 0; -+ struct stat _st; -+ -+ if (!st) -+ { -+ if (stat (ctx->path, &_st) < 0) -+ return; -+ st = &_st; -+ } -+ -+ utimebuf.actime = st->st_atime; -+ utimebuf.modtime = st->st_mtime; -+ -+ for (i = 0; !found && i < ctx->msgcount; i++) - if (!ctx->hdrs[i]->deleted && !ctx->hdrs[i]->read && !ctx->hdrs[i]->old) -- { -- utimebuf.actime = now - 1; -- utimebuf.modtime = now; -- utime (ctx->path, &utimebuf); -- return; -- } -- } -+ found = 1; -+ -+ if (found && utimebuf.actime >= utimebuf.modtime) -+ utimebuf.actime = utimebuf.modtime - 1; -+ -+ utime (ctx->path, &utimebuf); - } - -@@ -713,4 +721,5 @@ - int first = -1; /* first message to be written */ - LOFF_T offset; /* location in mailbox to write changed messages */ -+ struct stat statbuf; - struct m_update_t *newOffset = NULL; - struct m_update_t *oldOffset = NULL; -@@ -904,4 +913,13 @@ - fp = NULL; - -+ /* Save the state of this folder. */ -+ if (stat (ctx->path, &statbuf) == -1) -+ { -+ mutt_perror (ctx->path); -+ mutt_sleep (5); -+ unlink (tempfile); -+ goto bail; -+ } -+ - if ((fp = fopen (tempfile, "r")) == NULL) - { -@@ -973,4 +991,7 @@ - } - -+ /* Restore the previous access/modification times */ -+ reset_atime (ctx, &statbuf); -+ - /* reopen the mailbox in read-only mode */ - if ((ctx->fp = fopen (ctx->path, "r")) == NULL) -@@ -998,9 +1019,4 @@ - unlink (tempfile); /* remove partial copy of the mailbox */ - mutt_unblock_signals (); -- -- /* if mailbox has new mail, mangle atime+mtime to make buffy check -- * report new mail for it */ -- if (!option (OPTCHECKMBOXSIZE)) -- reset_atime (ctx); - - return (0); /* signal success */ diff --git a/mail-client/mutt/files/mutt-1.5.20-mbox-unchanged-new-mail-9ae13dedb5ed.patch b/mail-client/mutt/files/mutt-1.5.20-mbox-unchanged-new-mail-9ae13dedb5ed.patch deleted file mode 100644 index ca2b04699884..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-mbox-unchanged-new-mail-9ae13dedb5ed.patch +++ /dev/null @@ -1,44 +0,0 @@ -http://dev.mutt.org/trac/changeset/9ae13dedb5ed - -Fixup atime for mbox/mmdf also when mailbox is unchanged but has new -mail. See #1362. - -Index: mbox.c -=================================================================== ---- mbox.c (revision 5921:bd59be56c6b0) -+++ mbox.c (revision 5922:9ae13dedb5ed) -@@ -682,5 +682,5 @@ - /* if mailbox has at least 1 new message, sets mtime > atime of mailbox - * so buffy check reports new mail */ --static void reset_atime (CONTEXT *ctx, struct stat *st) -+void mbox_reset_atime (CONTEXT *ctx, struct stat *st) - { - struct utimbuf utimebuf; -@@ -992,5 +992,5 @@ - - /* Restore the previous access/modification times */ -- reset_atime (ctx, &statbuf); -+ mbox_reset_atime (ctx, &statbuf); - - /* reopen the mailbox in read-only mode */ -Index: mx.c -=================================================================== ---- mx.c (revision 5907:a2a868fc40ea) -+++ mx.c (revision 5922:9ae13dedb5ed) -@@ -927,4 +927,6 @@ - if (!ctx->quiet) - mutt_message _("Mailbox is unchanged."); -+ if (ctx->magic == M_MBOX || ctx->magic == M_MMDF) -+ mbox_reset_atime (ctx, NULL); - mx_fastclose_mailbox (ctx); - return 0; -Index: mx.h -=================================================================== ---- mx.h (revision 4343:2bccf51eedac) -+++ mx.h (revision 5922:9ae13dedb5ed) -@@ -57,4 +57,5 @@ - void mbox_unlock_mailbox (CONTEXT *); - int mbox_check_empty (const char *); -+void mbox_reset_atime (CONTEXT *, struct stat *); - - int mh_read_dir (CONTEXT *, const char *); diff --git a/mail-client/mutt/files/mutt-1.5.20-mhs-flags-leak-9f3053f75f27.patch b/mail-client/mutt/files/mutt-1.5.20-mhs-flags-leak-9f3053f75f27.patch deleted file mode 100644 index e89dfd5cd2d8..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-mhs-flags-leak-9f3053f75f27.patch +++ /dev/null @@ -1,16 +0,0 @@ -http://dev.mutt.org/trac/changeset/9f3053f75f27
-http://dev.mutt.org/trac/ticket/3303
-
-Don't leak mhs flags in mh_buffy(). Closes #3303.
-
-
-Index: mh.c
-===================================================================
---- mh.c (revision 5847:82a581c24f1a)
-+++ mh.c (revision 5985:9f3053f75f27)
-@@ -239,4 +239,5 @@
- if (mhs_check (&mhs, i) & MH_SEQ_UNSEEN)
- r = 1;
-+ mhs_free_sequences (&mhs);
- return r;
- }
diff --git a/mail-client/mutt/files/mutt-1.5.20-next-invalid-pattern-crash-6a08a5244d60.patch b/mail-client/mutt/files/mutt-1.5.20-next-invalid-pattern-crash-6a08a5244d60.patch deleted file mode 100644 index 18b84a59b535..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-next-invalid-pattern-crash-6a08a5244d60.patch +++ /dev/null @@ -1,23 +0,0 @@ -http://dev.mutt.org/trac/ticket/3315 -http://dev.mutt.org/trac/changeset/6a08a5244d60 - -Clear last search pattern if it's invalid. Closes #3315. - -We keep both, the string version and compiled version around -for search-next; however, in case of parsing errors we dropped -only the compiled version and not the string one making the -code attempting to perform a search using a NULL pattern. - -Index: pattern.c -=================================================================== ---- pattern.c (revision 6018:053ef7bbaa72) -+++ pattern.c (revision 6019:6a08a5244d60) -@@ -1437,6 +1437,7 @@ - err.dsize = sizeof (error); - if ((SearchPattern = mutt_pattern_comp (temp, M_FULL_MSG, &err)) == NULL) -- { -+ { - mutt_error ("%s", error); -+ LastSearch[0] = '\0'; - return (-1); - } diff --git a/mail-client/mutt/files/mutt-1.5.20-no-hcolor-in-hcache-b7d2cb7c7ce1.patch b/mail-client/mutt/files/mutt-1.5.20-no-hcolor-in-hcache-b7d2cb7c7ce1.patch deleted file mode 100644 index a75c434ee76f..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-no-hcolor-in-hcache-b7d2cb7c7ce1.patch +++ /dev/null @@ -1,22 +0,0 @@ -http://dev.mutt.org/hg/mutt/rev/b7d2cb7c7ce1 - -# HG changeset patch -# User Daniel Jacobowitz <dan@debian.org> -# Date 1260514342 28800 -# Node ID b7d2cb7c7ce19e67444412d0bc840a4e7ddf303f -# Parent 1cf34ea1f12864efa1c3f4481fc409ed6c8e11eb -Do not store header color in hcache. -If the color directive is removed from muttrc, the cached value from -the last directive would otherwise still be in effect. - ---- a/hcache.c Mon Dec 07 23:08:47 2009 -0800 -+++ b/hcache.c Thu Dec 10 22:52:22 2009 -0800 -@@ -624,6 +624,7 @@ - nh.limited = 0; - nh.num_hidden = 0; - nh.recipient = 0; -+ nh.pair = 0; - nh.attach_valid = 0; - nh.path = NULL; - nh.tree = NULL; - diff --git a/mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch b/mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch deleted file mode 100644 index ac721a28004f..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-null-dptr-use-data-817c60d5da7d.patch +++ /dev/null @@ -1,23 +0,0 @@ -http://dev.mutt.org/hg/mutt/rev/817c60d5da7d - -# HG changeset patch -# User Brendan Cully <brendan@kublai.com> -# Date 1268089116 28800 -# Node ID 817c60d5da7dae3376a6ad683091ae24d7cf2ed2 -# Parent 8ec606f6cafb55299bec617d7d743deceb8d9e2d -mutt_buffer_printf: NULL dptr means use data - -diff -r 8ec606f6cafb -r 817c60d5da7d muttlib.c ---- a/muttlib.c Mon Mar 08 14:52:17 2010 -0800 -+++ b/muttlib.c Mon Mar 08 14:58:36 2010 -0800 -@@ -1675,6 +1675,9 @@ - va_start (ap, fmt); - va_copy (ap_retry, ap); - -+ if (!buf->dptr) -+ buf->dptr = buf->data; -+ - doff = buf->dptr - buf->data; - blen = buf->dsize - doff; - /* solaris 9 vsnprintf barfs when blen is 0 */ - diff --git a/mail-client/mutt/files/mutt-1.5.20-off-by-one-mailcap-736b6af3c5f1.patch b/mail-client/mutt/files/mutt-1.5.20-off-by-one-mailcap-736b6af3c5f1.patch deleted file mode 100644 index 8b5e0f89159a..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-off-by-one-mailcap-736b6af3c5f1.patch +++ /dev/null @@ -1,29 +0,0 @@ -http://dev.mutt.org/trac/changeset/736b6af3c5f1 -http://dev.mutt.org/trac/ticket/3362 - -Fix off-by-one errors in mailcap parser. Closes #3362 - - -Index: rfc1524.c -=================================================================== ---- rfc1524.c (revision 5827:776ef9dbe4d2) -+++ rfc1524.c (revision 6033:736b6af3c5f1) -@@ -69,7 +69,8 @@ - mutt_sanitize_filename (type, 0); - -- while (command[x] && x<clen && y<sizeof(buf)) -- { -- if (command[x] == '\\') { -+ while (x < clen && command[x] && y < sizeof (buf) - 1) -+ { -+ if (command[x] == '\\') -+ { - x++; - buf[y++] = command[x++]; -@@ -86,5 +87,5 @@ - - x++; -- while (command[x] && command[x] != '}' && z<sizeof(param)) -+ while (command[x] && command[x] != '}' && z < sizeof (param) - 1) - param[z++] = command[x++]; - param[z] = '\0'; diff --git a/mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch b/mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch deleted file mode 100644 index 2a93cb385e01..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-pop-port-in-url-6b057dc52222.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://dev.mutt.org/trac/changeset/6b057dc52222 -http://dev.mutt.org/trac/ticket/3322 - -# HG changeset patch -# User Antonio Radici <antonio@dyne.org> -# Date 1267406350 28800 -# Node ID 6b057dc522224530f8d3146ce5efef747c60d1dc -# Parent 2c78b28027cc59762d8c10097196b3aa855e185a -pop: allow user-specified port to override default in URL. -Closes #3322. - -diff -r 2c78b28027cc -r 6b057dc52222 pop_lib.c ---- a/pop_lib.c Sun Feb 28 17:00:33 2010 -0800 -+++ b/pop_lib.c Sun Feb 28 17:19:10 2010 -0800 -@@ -43,6 +43,7 @@ - /* Defaults */ - acct->flags = 0; - acct->type = M_ACCT_TYPE_POP; -+ acct->port = 0; - - c = safe_strdup (path); - url_parse_ciss (&url, c); -@@ -60,10 +61,12 @@ - acct->flags |= M_ACCT_SSL; - - service = getservbyname (url.scheme == U_POP ? "pop3" : "pop3s", "tcp"); -- if (service) -- acct->port = ntohs (service->s_port); -- else -- acct->port = url.scheme == U_POP ? POP_PORT : POP_SSL_PORT;; -+ if (!acct->port) { -+ if (service) -+ acct->port = ntohs (service->s_port); -+ else -+ acct->port = url.scheme == U_POP ? POP_PORT : POP_SSL_PORT;; -+ } - - FREE (&c); - return 0; - diff --git a/mail-client/mutt/files/mutt-1.5.20-propagate-mh_read_sequences-2fc9348684fe.patch b/mail-client/mutt/files/mutt-1.5.20-propagate-mh_read_sequences-2fc9348684fe.patch deleted file mode 100644 index d86628c05182..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-propagate-mh_read_sequences-2fc9348684fe.patch +++ /dev/null @@ -1,31 +0,0 @@ -http://dev.mutt.org/trac/changeset/2fc9348684fe -http://dev.mutt.org/trac/ticket/3308 - -Properly propagate mh_read_sequences result. Closes #3308. - - -Index: mh.c -=================================================================== ---- mh.c (revision 5985:9f3053f75f27) -+++ mh.c (revision 5999:2fc9348684fe) -@@ -168,5 +168,5 @@ - - short f; -- int first, last, rc; -+ int first, last, rc = 0; - - char pathname[_POSIX_PATH_MAX]; -@@ -208,5 +208,5 @@ - FREE (&buff); - safe_fclose (&fp); -- return 0; -+ return rc; - } - -@@ -1157,5 +1157,5 @@ - if (ctx->magic == M_MH) - { -- if (mh_read_sequences (&mhs, ctx->path) >= 0) -+ if (mh_read_sequences (&mhs, ctx->path) < 0) - return -1; - mh_update_maildir (md, &mhs); diff --git a/mail-client/mutt/files/mutt-1.5.20-realpath-slowness.patch b/mail-client/mutt/files/mutt-1.5.20-realpath-slowness.patch new file mode 100644 index 000000000000..9a9753e24297 --- /dev/null +++ b/mail-client/mutt/files/mutt-1.5.20-realpath-slowness.patch @@ -0,0 +1,23 @@ +--- buffy.c.orig 2010-04-09 08:47:36.000000000 +0200 ++++ buffy.c 2010-04-09 08:51:38.000000000 +0200 +@@ -223,10 +223,18 @@ + if(!*buf) continue; + + /* avoid duplicates */ +- p = realpath (buf, f1); ++#ifdef USE_IMAP ++ p = q = NULL; ++ if (!mx_is_imap (buf)) ++#endif ++ p = realpath (buf, f1); ++ + for (tmp = &Incoming; *tmp; tmp = &((*tmp)->next)) + { +- q = realpath ((*tmp)->path, f2); ++#ifdef USE_IMAP ++ if (!mx_is_imap ((*tmp)->path)) ++#endif ++ q = realpath ((*tmp)->path, f2); + if (mutt_strcmp (p ? p : buf, q ? q : (*tmp)->path) == 0) + { + dprint(3,(debugfile,"mailbox '%s' already registered as '%s'\n", buf, (*tmp)->path)); diff --git a/mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch b/mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch deleted file mode 100644 index 30cf74c039ce..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-regexp-fail-crash-05cec973f0d9.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://dev.mutt.org/hg/mutt/rev/05cec973f0d9 -http://dev.mutt.org/hg/mutt/rev/8ec606f6cafb - -# HG changeset patch -# User Brendan Cully <brendan@kublai.com> -# Date 1268089247 28800 -# Node ID 05cec973f0d97065709f2ec55a42b39797995eff -# Parent 817c60d5da7dae3376a6ad683091ae24d7cf2ed2 -When regexp compilation fails, report actual pattern along with error. - -diff -r 817c60d5da7d -r 05cec973f0d9 pattern.c ---- a/pattern.c Mon Mar 08 14:58:36 2010 -0800 -+++ b/pattern.c Mon Mar 08 15:00:47 2010 -0800 -@@ -254,6 +254,7 @@ - static int eat_regexp (pattern_t *pat, BUFFER *s, BUFFER *err) - { - BUFFER buf; -+ char errmsg[STRING]; - int r; - - memset (&buf, 0, sizeof (buf)); -@@ -290,14 +291,15 @@ - { - pat->p.rx = safe_malloc (sizeof (regex_t)); - r = REGCOMP (pat->p.rx, buf.data, REG_NEWLINE | REG_NOSUB | mutt_which_case (buf.data)); -- FREE (&buf.data); - if (r) - { -- regerror (r, pat->p.rx, err->data, err->dsize); -- regfree (pat->p.rx); -+ regerror (r, pat->p.rx, errmsg, sizeof (errmsg)); -+ mutt_buffer_printf (err, "'%s': %s", buf.data, errmsg); -+ FREE (&buf.data); - FREE (&pat->p.rx); - return (-1); - } -+ FREE (&buf.data); - } - - return 0; diff --git a/mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch b/mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch deleted file mode 100644 index 0da93d5a74f4..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-rfc-2047-decode-before-dequote-2a4ca6917fd0.patch +++ /dev/null @@ -1,116 +0,0 @@ -http://dev.mutt.org/trac/ticket/2014 -http://dev.mutt.org/hg/mutt/rev/165b998920e4 -http://dev.mutt.org/hg/mutt/rev/cc02f079b1b9 -http://dev.mutt.org/hg/mutt/rev/41cf44ddbb4c -http://dev.mutt.org/hg/mutt/rev/fec2720ff6ef - -# HG changeset patch -# User Brendan Cully <brendan@kublai.com> -# Date 1267511730 28800 -# Node ID 165b998920e45655aef33c74b76fe39b9ec9dc0b -# Parent 86d93280e5b32af477502f124f5b12f65f879e53 -Another attempt to dequote RFC2047-encoded address comments (see #2014) - -diff -r 86d93280e5b3 -r 165b998920e4 copy.c ---- a/copy.c Mon Mar 01 16:14:57 2010 -0800 -+++ b/copy.c Mon Mar 01 22:35:30 2010 -0800 -@@ -868,6 +868,7 @@ - int l, rp = 0; - - ADDRESS *a = NULL; -+ ADDRESS *cur = NULL; - - switch (tolower ((unsigned char) *s)) - { -@@ -937,6 +938,9 @@ - - mutt_addrlist_to_local (a); - rfc2047_decode_adrlist (a); -+ for (cur = a; cur; cur = cur->next) -+ if (cur->personal) -+ rfc822_dequote_comment (cur->personal); - - /* angle brackets for return path are mandated by RfC5322, - * so leave Return-Path as-is */ -diff -r 86d93280e5b3 -r 165b998920e4 rfc822.c ---- a/rfc822.c Mon Mar 01 16:14:57 2010 -0800 -+++ b/rfc822.c Mon Mar 01 22:35:30 2010 -0800 -@@ -60,7 +60,7 @@ - "bad address spec" - }; - --static void rfc822_dequote_comment (char *s) -+void rfc822_dequote_comment (char *s) - { - char *w = s; - -@@ -177,17 +177,10 @@ - static const char * - parse_quote (const char *s, char *token, size_t *tokenlen, size_t tokenmax) - { -- if (*tokenlen < tokenmax) -- token[(*tokenlen)++] = '"'; - while (*s) - { - if (*tokenlen < tokenmax) - token[*tokenlen] = *s; -- if (*s == '"') -- { -- (*tokenlen)++; -- return (s + 1); -- } - if (*s == '\\') - { - if (!*++s) -@@ -196,6 +189,8 @@ - if (*tokenlen < tokenmax) - token[*tokenlen] = *s; - } -+ else if (*s == '"') -+ return (s + 1); - (*tokenlen)++; - s++; - } -@@ -431,6 +426,17 @@ - } - s = ps; - } -+ else if (*s == '"') -+ { -+ if (phraselen && phraselen < sizeof (phrase) - 1) -+ phrase[phraselen++] = ' '; -+ if ((ps = parse_quote (s + 1, phrase, &phraselen, sizeof (phrase) - 1)) == NULL) -+ { -+ rfc822_free_address (&top); -+ return NULL; -+ } -+ s = ps; -+ } - else if (*s == ':') - { - cur = rfc822_new_address (); -@@ -490,13 +496,7 @@ - terminate_buffer (phrase, phraselen); - cur = rfc822_new_address (); - if (phraselen) -- { -- if (cur->personal) -- FREE (&cur->personal); -- /* if we get something like "Michael R. Elkins" remove the quotes */ -- rfc822_dequote_comment (phrase); - cur->personal = safe_strdup (phrase); -- } - if ((ps = parse_route_addr (s + 1, comment, &commentlen, sizeof (comment) - 1, cur)) == NULL) - { - rfc822_free_address (&top); -diff -r 86d93280e5b3 -r 165b998920e4 rfc822.h ---- a/rfc822.h Mon Mar 01 16:14:57 2010 -0800 -+++ b/rfc822.h Mon Mar 01 22:35:30 2010 -0800 -@@ -46,6 +46,7 @@ - } - ADDRESS; - -+void rfc822_dequote_comment (char *s); - void rfc822_free_address (ADDRESS **); - void rfc822_qualify (ADDRESS *, const char *); - ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s); diff --git a/mail-client/mutt/files/mutt-1.5.20-search-pattern-crash-053ef7bbaa72.patch b/mail-client/mutt/files/mutt-1.5.20-search-pattern-crash-053ef7bbaa72.patch deleted file mode 100644 index df8d99e8fb6a..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-search-pattern-crash-053ef7bbaa72.patch +++ /dev/null @@ -1,22 +0,0 @@ -http://dev.mutt.org/trac/ticket/3314 -http://dev.mutt.org/trac/changeset/053ef7bbaa72 - -Bail on missing pattern modifiers at end of pattern. Closes #3314. - -Index: pattern.c -=================================================================== ---- pattern.c (revision 5989:77ac8b5c2be6) -+++ pattern.c (revision 6018:053ef7bbaa72) -@@ -824,5 +824,11 @@ - case '=': - case '~': -- if (*(ps.dptr + 1) == '(') -+ if (!*(ps.dptr + 1)) -+ { -+ snprintf (err->data, err->dsize, _("missing pattern: %s"), ps.dptr); -+ mutt_pattern_free (&curlist); -+ return NULL; -+ } -+ if (*(ps.dptr + 1) == '(') - { - ps.dptr ++; /* skip ~ */ diff --git a/mail-client/mutt/files/mutt-1.5.20-smtp-batch-mode-0a3de4d9a009-f6c6066a5925.patch b/mail-client/mutt/files/mutt-1.5.20-smtp-batch-mode-0a3de4d9a009-f6c6066a5925.patch deleted file mode 100644 index af9d6c57e68b..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-smtp-batch-mode-0a3de4d9a009-f6c6066a5925.patch +++ /dev/null @@ -1,72 +0,0 @@ -http://dev.mutt.org/trac/changeset/0a3de4d9a009 - -SMTP: use $smtp_pass in batch mode. Closes #3289. - -mutt_account_getpass() copying the password from $smtp_pass into the -account structure is only called from the SASL callback we only use if -we're sure we don't need curses (i.e. have the pass already). - -http://dev.mutt.org/trac/changeset/f6c6066a5925 - -Make getuser/pass abort if input is required in batch mode. -Replaces [0a3de4d9a009]. See #3289. - - -Index: account.c -=================================================================== ---- account.c (revision 5557:6c58b678d360) -+++ account.c (revision 5965:f6c6066a5925) -@@ -156,4 +156,6 @@ - strfcpy (account->user, PopUser, sizeof (account->user)); - #endif -+ else if (option (OPTNOCURSES)) -+ return -1; - /* prompt (defaults to unix username), copy into account->user */ - else -@@ -216,4 +218,6 @@ - strfcpy (account->pass, SmtpPass, sizeof (account->pass)); - #endif -+ else if (option (OPTNOCURSES)) -+ return -1; - else - { -Index: mutt_sasl.c -=================================================================== ---- mutt_sasl.c (revision 5711:6fac57b97bf1) -+++ mutt_sasl.c (revision 5965:f6c6066a5925) -@@ -305,5 +305,5 @@ - snprintf (prompt, sizeof (prompt), "%s: ", interaction->prompt); - resp[0] = '\0'; -- if (mutt_get_field (prompt, resp, sizeof (resp), 0)) -+ if (option (OPTNOCURSES) || mutt_get_field (prompt, resp, sizeof (resp), 0)) - return SASL_FAIL; - -Index: smtp.c -=================================================================== ---- smtp.c (revision 5963:0a3de4d9a009) -+++ smtp.c (revision 5965:f6c6066a5925) -@@ -173,5 +173,5 @@ - struct stat st; - int r, term = 0; -- size_t buflen; -+ size_t buflen = 0; - - fp = fopen (msgfile, "r"); -@@ -461,10 +455,4 @@ - - #ifdef USE_SASL -- if (!(conn->account.flags & M_ACCT_PASS) && option (OPTNOCURSES)) -- { -- mutt_error (_("Interactive SMTP authentication not supported")); -- mutt_sleep (1); -- return -1; -- } - return smtp_auth (conn); - #else -@@ -610,5 +598,5 @@ - } - strfcpy (buf + len, "\r\n", sizeof (buf) - len); -- } while (rc == smtp_ready); -+ } while (rc == smtp_ready && saslrc != SASL_FAIL); - - if (smtp_success (rc)) diff --git a/mail-client/mutt/files/mutt-1.5.20-ssl-CVE-2009-3765-dc09812e63a3.patch b/mail-client/mutt/files/mutt-1.5.20-ssl-CVE-2009-3765-dc09812e63a3.patch deleted file mode 100644 index becf16baa486..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-ssl-CVE-2009-3765-dc09812e63a3.patch +++ /dev/null @@ -1,25 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=290660 -http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-3765 -http://dev.mutt.org/trac/changeset/6016:dc09812e63a3/mutt_ssl.c - -Index: mutt_ssl.c -=================================================================== ---- mutt_ssl.c (revision 5870:dc9ec900c657) -+++ mutt_ssl.c (revision 6016:dc09812e63a3) -@@ -682,5 +682,6 @@ - if (subj_alt_name->type == GEN_DNS) - { -- if ((match_found = hostname_match(hostname_ascii, -+ if (mutt_strlen(subj_alt_name) == subj_alt_name->d.ia5->length && -+ (match_found = hostname_match(hostname_ascii, - (char *)(subj_alt_name->d.ia5->data)))) - { -@@ -712,5 +713,7 @@ - goto out; - } -- match_found = hostname_match(hostname_ascii, buf); -+ if (mutt_strlen(buf) == bufsize - 1) { -+ match_found = hostname_match(hostname_ascii, buf); -+ } - } - diff --git a/mail-client/mutt/files/mutt-1.5.20-ssl-stack-compile-fix-1cf34ea1f128.patch b/mail-client/mutt/files/mutt-1.5.20-ssl-stack-compile-fix-1cf34ea1f128.patch deleted file mode 100644 index ae5c81feb3a9..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-ssl-stack-compile-fix-1cf34ea1f128.patch +++ /dev/null @@ -1,17 +0,0 @@ -http://dev.mutt.org/trac/changeset/1cf34ea1f128 -http://dev.mutt.org/trac/ticket/3356 - -STACK* is not defined with newer SSL, use STACK_OF instead. -Closes #3356. - -Index: mutt_ssl.c -=================================================================== ---- mutt_ssl.c (revision 6016:dc09812e63a3) -+++ mutt_ssl.c (revision 6031:1cf34ea1f128) -@@ -653,5 +653,5 @@ - int bufsize; - /* needed to get the DNS subjectAltNames: */ -- STACK *subj_alt_names; -+ STACK_OF(GENERAL_NAME) *subj_alt_names; - int subj_alt_names_count; - GENERAL_NAME *subj_alt_name; diff --git a/mail-client/mutt/files/mutt-1.5.20-subject-mistruncation-31881f38ca1e.patch b/mail-client/mutt/files/mutt-1.5.20-subject-mistruncation-31881f38ca1e.patch deleted file mode 100644 index f6f46e40e58b..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-subject-mistruncation-31881f38ca1e.patch +++ /dev/null @@ -1,29 +0,0 @@ -http://dev.mutt.org/trac/ticket/3364 -http://dev.mutt.org/trac/changeset/31881f38ca1e - -Hack mutt_wstr_trunc to treat M_TREE characters as 1 cell. -Closes #3364. - -Index: curs_lib.c -=================================================================== ---- curs_lib.c (revision 6010:c837ab790d2e) -+++ curs_lib.c (revision 6035:31881f38ca1e) -@@ -884,5 +884,5 @@ - wchar_t wc; - int w = 0, l = 0, cl; -- size_t cw, n; -+ int cw, n; - mbstate_t mbstate; - -@@ -898,5 +898,11 @@ - cw = cl = 1; - else -+ { - cw = wcwidth (wc); -+ /* hack because M_TREE symbols aren't turned into characters -+ * until rendered by print_enriched_string (#3364) */ -+ if (cw < 0 && cl == 1 && src[0] && src[0] < M_TREE_MAX) -+ cw = 1; -+ } - if (cl + l > maxlen || cw + w > maxwid) - break; diff --git a/mail-client/mutt/files/mutt-1.5.20-tab-subject-questionmark-298194c414f0-cff8e8ce4327.patch b/mail-client/mutt/files/mutt-1.5.20-tab-subject-questionmark-298194c414f0-cff8e8ce4327.patch deleted file mode 100644 index 9aa969d0696e..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-tab-subject-questionmark-298194c414f0-cff8e8ce4327.patch +++ /dev/null @@ -1,38 +0,0 @@ -http://dev.mutt.org/trac/changeset/298194c414f0 - -Allow tabs in index subject. Closes #3270. - -http://dev.mutt.org/trac/changeset/cff8e8ce4327 - -Render blanks to spaces in index, fixes [298194c414f0] - -wcwidth(<tab>) returns -1 so 'foo<tab>bar' was rendered to 'foobar', -and now to 'foo bar'. Closes #3270 again. - - -Index: configure.ac -=================================================================== ---- configure.ac (revision 5939:199b126a7623) -+++ configure.ac (revision 5958:298194c414f0) -@@ -1216,5 +1216,5 @@ - - AC_CHECK_HEADERS(wctype.h) --AC_CHECK_FUNCS(iswalnum iswalpha iswcntrl iswdigit) -+AC_CHECK_FUNCS(iswalnum iswalpha iswblank iswcntrl iswdigit) - AC_CHECK_FUNCS(iswgraph iswlower iswprint iswpunct iswspace iswupper) - AC_CHECK_FUNCS(iswxdigit towupper towlower) -Index: curs_lib.c -=================================================================== ---- curs_lib.c (revision 5936:642987450d83) -+++ curs_lib.c (revision 5958:cff8e8ce4327) -@@ -726,5 +726,10 @@ - else - { -+#ifdef HAVE_ISWBLANK -+ if (iswblank (wc)) -+ wc = ' '; -+ else -+#endif - if (!IsWPrint (wc)) - wc = '?'; - w = wcwidth (wc); diff --git a/mail-client/mutt/files/mutt-1.5.20-ungroup-command-77ac8b5c2be6.patch b/mail-client/mutt/files/mutt-1.5.20-ungroup-command-77ac8b5c2be6.patch deleted file mode 100644 index 90e48041f5e5..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-ungroup-command-77ac8b5c2be6.patch +++ /dev/null @@ -1,538 +0,0 @@ -http://dev.mutt.org/trac/changeset/77ac8b5c2be6 -http://dev.mutt.org/trac/ticket/3304 - -Implement ungroup command. Closes #3304. - -requires 7c4484ba9e4b (patch added) -Move remove_from_rx_list() to muttlib.c, name it mutt_remove_from_rx_list() - - -Index: group.c -=================================================================== ---- group.c (revision 5801:19e62bd1549b) -+++ group.c (revision 5989:77ac8b5c2be6) -@@ -49,6 +50,42 @@ - hash_insert (Groups, p->name, p, 0); - } -- -+ - return p; -+} -+ -+static void group_free (void *p) -+{ -+ group_t *g = (group_t *)p; -+ -+ if (!g) -+ return; -+ FREE(&g->name); -+ rfc822_free_address (&g->as); -+ mutt_free_rx_list (&g->rs); -+ FREE(&g); -+} -+ -+int mutt_group_remove (group_t * g, BUFFER * err) -+{ -+ int h; -+ -+ if (!g) -+ return -1; -+ h = Groups->hash_string ((const unsigned char *)g->name, Groups->nelem); -+ if (!hash_find_hash (Groups, h, g->name)) -+ { -+ if (err) -+ snprintf (err->data, err->dsize, _("No such group: %s"), g->name); -+ return -1; -+ } -+ hash_delete_hash (Groups, h, g->name, g, group_free); -+ return 0; -+} -+ -+static int empty_group (group_t *g) -+{ -+ if (!g) -+ return -1; -+ return !g->as && !g->rs; - } - -@@ -92,7 +129,27 @@ - } - -+static int mutt_group_remove_adrlist (group_t *g, ADDRESS *a) -+{ -+ ADDRESS *p; -+ -+ if (!g) -+ return -1; -+ if (!a) -+ return -1; -+ -+ for (p = a; p; p = p->next) -+ rfc822_remove_from_adrlist (&g->as, p->mailbox); -+ -+ return 0; -+} -+ - static int mutt_group_add_rx (group_t *g, const char *s, int flags, BUFFER *err) - { - return mutt_add_to_rx_list (&g->rs, s, flags, err); -+} -+ -+static int mutt_group_remove_rx (group_t *g, const char *s) -+{ -+ return mutt_remove_from_rx_list (&g->rs, s); - } - -@@ -103,8 +160,22 @@ - } - -+int mutt_group_context_remove_adrlist (group_context_t *ctx, ADDRESS * a) -+{ -+ int rv = 0; -+ -+ for (; (!rv) && ctx; ctx = ctx->next) -+ { -+ rv = mutt_group_remove_adrlist (ctx->g, a); -+ if (empty_group (ctx->g)) -+ mutt_group_remove (ctx->g, NULL); -+ } -+ -+ return rv; -+} -+ - int mutt_group_context_add_rx (group_context_t *ctx, const char *s, int flags, BUFFER *err) - { - int rv = 0; -- -+ - for (; (!rv) && ctx; ctx = ctx->next) - rv = mutt_group_add_rx (ctx->g, s, flags, err); -@@ -113,8 +184,22 @@ - } - -+int mutt_group_context_remove_rx (group_context_t *ctx, const char *s) -+{ -+ int rv = 0; -+ -+ for (; (!rv) && ctx; ctx = ctx->next) -+ { -+ rv = mutt_group_remove_rx (ctx->g, s); -+ if (empty_group (ctx->g)) -+ mutt_group_remove (ctx->g, NULL); -+ } -+ -+ return rv; -+} -+ - int mutt_group_match (group_t *g, const char *s) - { - ADDRESS *ap; -- -+ - if (s && g) - { -Index: group.h -=================================================================== ---- group.h (revision 5989:77ac8b5c2be6) -+++ group.h (revision 5989:77ac8b5c2be6) -@@ -0,0 +1,39 @@ -+/* -+ * Copyright (C) 2006 Thomas Roessler <roessler@does-not-exist.org> -+ * Copyright (C) 2009 Rocco Rutte <pdmef@gmx.net> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+#ifndef _MUTT_GROUP_H_ -+#define _MUTT_GROUP_H_ 1 -+ -+#define M_GROUP 0 -+#define M_UNGROUP 1 -+ -+void mutt_group_add_adrlist (group_t *g, ADDRESS *a); -+ -+void mutt_group_context_add (group_context_t **ctx, group_t *group); -+void mutt_group_context_destroy (group_context_t **ctx); -+void mutt_group_context_add_adrlist (group_context_t *ctx, ADDRESS *a); -+int mutt_group_context_add_rx (group_context_t *ctx, const char *s, int flags, BUFFER *err); -+ -+int mutt_group_match (group_t *g, const char *s); -+ -+int mutt_group_remove (group_t *, BUFFER *); -+int mutt_group_context_remove_rx (group_context_t *ctx, const char *s); -+int mutt_group_context_remove_adrlist (group_context_t *ctx, ADDRESS *); -+ -+#endif /* _MUTT_GROUP_H_ */ -Index: init.c -=================================================================== ---- init.c (revision 5988:7c4484ba9e4b) -+++ init.c (revision 5989:77ac8b5c2be6) -@@ -32,4 +32,5 @@ - #include "mutt_crypt.h" - #include "mutt_idna.h" -+#include "group.h" - - #if defined(USE_SSL) -@@ -834,38 +835,53 @@ - ADDRESS *addr = NULL; - char *estr = NULL; -- -- do -+ -+ do - { - mutt_extract_token (buf, s, 0); - if (parse_group_context (&gc, buf, s, data, err) == -1) - goto bail; -- -+ -+ if (data == M_UNGROUP && !mutt_strcasecmp (buf->data, "*")) -+ { -+ if (mutt_group_remove (gc->g, err) < 0) -+ goto bail; -+ goto out; -+ } -+ - if (!mutt_strcasecmp (buf->data, "-rx")) - state = RX; - else if (!mutt_strcasecmp (buf->data, "-addr")) - state = ADDR; -- else -- { -- switch (state) -+ else -+ { -+ switch (state) - { - case NONE: -- strfcpy (err->data, _("Missing -rx or -addr."), err->dsize); -+ snprintf (err->data, err->dsize, _("%sgroup: missing -rx or -addr."), -+ data == M_UNGROUP ? "un" : ""); - goto bail; -- -+ - case RX: -- if (mutt_group_context_add_rx (gc, buf->data, REG_ICASE, err) != 0) -+ if (data == M_GROUP && -+ mutt_group_context_add_rx (gc, buf->data, REG_ICASE, err) != 0) -+ goto bail; -+ else if (data == M_UNGROUP && -+ mutt_group_context_remove_rx (gc, buf->data) < 0) - goto bail; - break; -- -+ - case ADDR: - if ((addr = mutt_parse_adrlist (NULL, buf->data)) == NULL) - goto bail; -- if (mutt_addrlist_to_idna (addr, &estr)) -- { -- snprintf (err->data, err->dsize, _("Warning: Bad IDN '%s'.\n"), -- estr); -+ if (mutt_addrlist_to_idna (addr, &estr)) -+ { -+ snprintf (err->data, err->dsize, _("%sgroup: warning: bad IDN '%s'.\n"), -+ data == 1 ? "un" : "", estr); - goto bail; - } -- mutt_group_context_add_adrlist (gc, addr); -+ if (data == M_GROUP) -+ mutt_group_context_add_adrlist (gc, addr); -+ else if (data == M_UNGROUP) -+ mutt_group_context_remove_adrlist (gc, addr); - rfc822_free_address (&addr); - break; -@@ -874,15 +890,10 @@ - } while (MoreArgs (s)); - -+out: - mutt_group_context_destroy (&gc); - return 0; - -- bail: -+bail: - mutt_group_context_destroy (&gc); -- return -1; --} -- --static int parse_ungroup (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) --{ -- strfcpy (err->data, "not implemented", err->dsize); - return -1; - } -Index: init.h -=================================================================== ---- init.h (revision 5976:376545d6909c) -+++ init.h (revision 5989:77ac8b5c2be6) -@@ -3420,5 +3420,4 @@ - - static int parse_group (BUFFER *, BUFFER *, unsigned long, BUFFER *); --static int parse_ungroup (BUFFER *, BUFFER *, unsigned long, BUFFER *); - - static int parse_lists (BUFFER *, BUFFER *, unsigned long, BUFFER *); -@@ -3473,6 +3472,6 @@ - { "fcc-save-hook", mutt_parse_hook, M_FCCHOOK | M_SAVEHOOK }, - { "folder-hook", mutt_parse_hook, M_FOLDERHOOK }, -- { "group", parse_group, 0 }, -- { "ungroup", parse_ungroup, 0 }, -+ { "group", parse_group, M_GROUP }, -+ { "ungroup", parse_group, M_UNGROUP }, - { "hdr_order", parse_list, UL &HeaderOrderList }, - #ifdef HAVE_ICONV -Index: pattern.c -=================================================================== ---- pattern.c (revision 5930:ed7eb5de7536) -+++ pattern.c (revision 5989:77ac8b5c2be6) -@@ -36,4 +36,5 @@ - #include "mutt_crypt.h" - #include "mutt_curses.h" -+#include "group.h" - - #ifdef USE_IMAP -Index: protos.h -=================================================================== ---- protos.h (revision 5977:f161c2f00d84) -+++ protos.h (revision 5989:77ac8b5c2be6) -@@ -76,9 +76,4 @@ - void mutt_parse_content_type (char *, BODY *); - void mutt_generate_boundary (PARAMETER **); --void mutt_group_add_adrlist (group_t *, ADDRESS *); --void mutt_group_context_add (group_context_t **ctx, group_t *group); --void mutt_group_context_destroy (group_context_t **ctx); --void mutt_group_add_adrlist (group_t *g, ADDRESS *a); --void mutt_group_context_add_adrlist (group_context_t *ctx, ADDRESS *a); - void mutt_delete_parameter (const char *attribute, PARAMETER **p); - void mutt_set_parameter (const char *, const char *, PARAMETER **); -@@ -312,6 +307,4 @@ - int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t); - int mutt_get_tmp_attachment (BODY *); --int mutt_group_match (group_t *g, const char *s); --int mutt_group_context_add_rx (group_context_t *ctx, const char *s, int flags, BUFFER *err); - int mutt_index_menu (void); - int mutt_invoke_sendmail (ADDRESS *, ADDRESS *, ADDRESS *, ADDRESS *, const char *, int); -Index: rfc822.c -=================================================================== ---- rfc822.c (revision 5923:ee3d174297bb) -+++ rfc822.c (revision 5989:77ac8b5c2be6) -@@ -81,4 +81,43 @@ - } - *w = 0; -+} -+ -+static void free_address (ADDRESS *a) -+{ -+ FREE(&a->personal); -+ FREE(&a->mailbox); -+#ifdef EXACT_ADDRESS -+ FREE(&a->val); -+#endif -+} -+ -+int rfc822_remove_from_adrlist (ADDRESS **a, const char *mailbox) -+{ -+ ADDRESS *p, *last = NULL, *t; -+ int rv = -1; -+ -+ p = *a; -+ last = NULL; -+ while (p) -+ { -+ if (ascii_strcasecmp (mailbox, p->mailbox) == 0) -+ { -+ if (last) -+ last->next = p->next; -+ else -+ (*a) = p->next; -+ t = p; -+ p = p->next; -+ free_address (t); -+ rv = 0; -+ } -+ else -+ { -+ last = p; -+ p = p->next; -+ } -+ } -+ -+ return (rv); - } - -Index: rfc822.h -=================================================================== ---- rfc822.h (revision 5986:848f08512bf3) -+++ rfc822.h (revision 5989:77ac8b5c2be6) -@@ -58,4 +58,5 @@ - void rfc822_cat (char *, size_t, const char *, const char *); - int rfc822_valid_msgid (const char *msgid); -+int rfc822_remove_from_adrlist (ADDRESS **a, const char *mailbox); - - extern int RFC822Error; - - - -Index: init.c -=================================================================== ---- init.c (revision 5903:b5ed5d96c775) -+++ init.c (revision 5988:7c4484ba9e4b) -@@ -600,40 +600,4 @@ - } - --static int remove_from_rx_list (RX_LIST **l, const char *str) --{ -- RX_LIST *p, *last = NULL; -- int rv = -1; -- -- if (mutt_strcmp ("*", str) == 0) -- { -- mutt_free_rx_list (l); /* ``unCMD *'' means delete all current entries */ -- rv = 0; -- } -- else -- { -- p = *l; -- last = NULL; -- while (p) -- { -- if (ascii_strcasecmp (str, p->rx->pattern) == 0) -- { -- mutt_free_regexp (&p->rx); -- if (last) -- last->next = p->next; -- else -- (*l) = p->next; -- FREE (&p); -- rv = 0; -- } -- else -- { -- last = p; -- p = p->next; -- } -- } -- } -- return (rv); --} -- - static int parse_unignore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) - { -@@ -701,5 +665,5 @@ - goto bail; - -- remove_from_rx_list (&UnAlternates, buf->data); -+ mutt_remove_from_rx_list (&UnAlternates, buf->data); - - if (mutt_add_to_rx_list (&Alternates, buf->data, REG_ICASE, err) != 0) -@@ -725,5 +689,5 @@ - { - mutt_extract_token (buf, s, 0); -- remove_from_rx_list (&Alternates, buf->data); -+ mutt_remove_from_rx_list (&Alternates, buf->data); - - if (mutt_strcmp (buf->data, "*") && -@@ -775,5 +739,5 @@ - else - { -- remove_from_rx_list(&NoSpamList, buf->data); -+ mutt_remove_from_rx_list(&NoSpamList, buf->data); - } - -@@ -842,5 +806,5 @@ - goto bail; - -- remove_from_rx_list (&UnMailLists, buf->data); -+ mutt_remove_from_rx_list (&UnMailLists, buf->data); - - if (mutt_add_to_rx_list (&MailLists, buf->data, REG_ICASE, err) != 0) -@@ -1194,6 +1158,6 @@ - { - mutt_extract_token (buf, s, 0); -- remove_from_rx_list (&SubscribedLists, buf->data); -- remove_from_rx_list (&MailLists, buf->data); -+ mutt_remove_from_rx_list (&SubscribedLists, buf->data); -+ mutt_remove_from_rx_list (&MailLists, buf->data); - - if (mutt_strcmp (buf->data, "*") && -@@ -1217,6 +1181,6 @@ - goto bail; - -- remove_from_rx_list (&UnMailLists, buf->data); -- remove_from_rx_list (&UnSubscribedLists, buf->data); -+ mutt_remove_from_rx_list (&UnMailLists, buf->data); -+ mutt_remove_from_rx_list (&UnSubscribedLists, buf->data); - - if (mutt_add_to_rx_list (&MailLists, buf->data, REG_ICASE, err) != 0) -@@ -1242,5 +1206,5 @@ - { - mutt_extract_token (buf, s, 0); -- remove_from_rx_list (&SubscribedLists, buf->data); -+ mutt_remove_from_rx_list (&SubscribedLists, buf->data); - - if (mutt_strcmp (buf->data, "*") && -Index: mutt.h -=================================================================== ---- mutt.h (revision 5956:ef6523d11f24) -+++ mutt.h (revision 5988:7c4484ba9e4b) -@@ -555,4 +555,5 @@ - LIST *mutt_add_list_n (LIST*, const void *, size_t); - LIST *mutt_find_list (LIST *, const char *); -+int mutt_remove_from_rx_list (RX_LIST **l, const char *str); - - void mutt_init (int, LIST *); -Index: muttlib.c -=================================================================== ---- muttlib.c (revision 5977:f161c2f00d84) -+++ muttlib.c (revision 5988:7c4484ba9e4b) -@@ -266,4 +266,40 @@ - } - return NULL; -+} -+ -+int mutt_remove_from_rx_list (RX_LIST **l, const char *str) -+{ -+ RX_LIST *p, *last = NULL; -+ int rv = -1; -+ -+ if (mutt_strcmp ("*", str) == 0) -+ { -+ mutt_free_rx_list (l); /* ``unCMD *'' means delete all current entries */ -+ rv = 0; -+ } -+ else -+ { -+ p = *l; -+ last = NULL; -+ while (p) -+ { -+ if (ascii_strcasecmp (str, p->rx->pattern) == 0) -+ { -+ mutt_free_regexp (&p->rx); -+ if (last) -+ last->next = p->next; -+ else -+ (*l) = p->next; -+ FREE (&p); -+ rv = 0; -+ } -+ else -+ { -+ last = p; -+ p = p->next; -+ } -+ } -+ } -+ return (rv); - } - diff --git a/mail-client/mutt/files/mutt-1.5.20-unmailbox-segfault-25e46aad362b.patch b/mail-client/mutt/files/mutt-1.5.20-unmailbox-segfault-25e46aad362b.patch deleted file mode 100644 index 5cc32d69d785..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-unmailbox-segfault-25e46aad362b.patch +++ /dev/null @@ -1,15 +0,0 @@ -http://dev.mutt.org/trac/changeset/25e46aad362b#file0 - -Do not free statically-allocated buffy buffer. -Unbreaks unmailboxes, closes #3273. - -Index: buffy.c -=================================================================== ---- buffy.c (revision 5851:8b2af5b64981) -+++ buffy.c (revision 5914:25e46aad362b) -@@ -237,5 +237,4 @@ - if(*tmp) - { -- FREE (&((*tmp)->path)); - tmp1=(*tmp)->next; - FREE (tmp); /* __FREE_CHECKED__ */ diff --git a/mail-client/mutt/files/mutt-1.5.20-yes-no-non-ascii-a6fddecdc5f5.patch b/mail-client/mutt/files/mutt-1.5.20-yes-no-non-ascii-a6fddecdc5f5.patch deleted file mode 100644 index ea507aa21e72..000000000000 --- a/mail-client/mutt/files/mutt-1.5.20-yes-no-non-ascii-a6fddecdc5f5.patch +++ /dev/null @@ -1,17 +0,0 @@ -http://dev.mutt.org/trac/ticket/3352 -http://dev.mutt.org/trac/changeset/a6fddecdc5f5 - -Make mutt_yesorno use mutt_message to print query. Closes #3352. - - -Index: curs_lib.c -=================================================================== ---- curs_lib.c (revision 6035:31881f38ca1e) -+++ curs_lib.c (revision 6043:a6fddecdc5f5) -@@ -224,5 +224,5 @@ - snprintf (answer_string, COLS + 1, " ([%s]/%s): ", def == M_YES ? yes : no, def == M_YES ? no : yes); - answer_string_len = strlen (answer_string); -- printw ("%.*s%s", COLS - answer_string_len, msg, answer_string); -+ mutt_message ("%.*s%s", COLS - answer_string_len, msg, answer_string); - FREE (&answer_string); - |