Hello community,
here is the log from the commit of package mutt.3290 for openSUSE:13.1:Update checked in at 2014-12-15 12:25:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/mutt.3290 (Old)
and /work/SRC/openSUSE:13.1:Update/.mutt.3290.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mutt.3290"
Changes:
--------
New Changes file:
--- /dev/null 2014-12-10 22:29:50.188034256 +0100
+++ /work/SRC/openSUSE:13.1:Update/.mutt.3290.new/mutt.changes 2014-12-15 12:24:20.000000000 +0100
@@ -0,0 +1,1071 @@
+-------------------------------------------------------------------
+Thu Dec 4 12:03:10 UTC 2014 - werner@suse.de
+
+- Add patch bsc907453-CVE-2014-9116-jessie.patch to fix bsc#907453
+ CVE-2014-9116: heap-based buffer overflow in mutt_substrdup()
+
+-------------------------------------------------------------------
+Mon Mar 17 13:44:43 UTC 2014 - meissner@suse.com
+
+- mutt-CVE-2014-0467.patch: fixed a buffer overflow during header display.
+ CVE-2014-0467 / bnc#868115
+
+-------------------------------------------------------------------
+Mon Aug 5 18:06:01 CEST 2013 - ro@suse.de
+
+- BuildRequire libgcrpyt-devel instead of libgcrypt for > 12.3
+
+-------------------------------------------------------------------
+Wed May 29 10:26:45 UTC 2013 - werner@suse.de
+
+- Enable mutt to parse e.g. PGP markers with CRLF
+
+-------------------------------------------------------------------
+Thu Apr 18 12:54:39 UTC 2013 - werner@suse.de
+
+- Add widechar.sidebar.dif as workaround: bnc#813498 - mutt crashes
+ in fgetwc in text_enriched_handler
+
+-------------------------------------------------------------------
+Mon Jan 14 09:11:05 UTC 2013 - werner@suse.de
+
+- Remove spurious blank line from new patch to make older patch(1)
+ also work with this
+- Make it build with older products
+
+-------------------------------------------------------------------
+Tue Dec 18 16:26:45 UTC 2012 - aginies@suse.com
+
+- update sidebar to version 20120829
+
+-------------------------------------------------------------------
+Tue Sep 18 15:47:45 UTC 2012 - vmiklos@suse.cz
+
+- Add back lost sidebar color patch.
+
+-------------------------------------------------------------------
+Thu Jun 21 10:04:20 UTC 2012 - asn@cryptomilk.org
+
+- Update sidebar patch.
+
+-------------------------------------------------------------------
+Tue May 29 14:10:05 UTC 2012 - puzel@suse.com
+
+- fix build with automake-1.12
+ - add: automake-1.12.patch
+
+-------------------------------------------------------------------
+Fri Apr 13 12:58:09 UTC 2012 - multiple1902@gmail.com
+
+- Added patch automatically add a filename and description to PGP/MIME attachments.
+
+-------------------------------------------------------------------
+Thu Dec 1 16:59:32 UTC 2011 - coolo@suse.com
+
+- add automake as buildrequire to avoid implicit dependency
+
+-------------------------------------------------------------------
+Thu Nov 24 00:44:07 UTC 2011 - vmiklos@vmiklos.hu
+
+- Add patch to introduce a new (optional) check when
+ replying to messages originating from a mailing list
+
+-------------------------------------------------------------------
+Tue Nov 22 12:58:28 UTC 2011 - werner@suse.de
+
+- Add patch to use libtinfo if available
+
+-------------------------------------------------------------------
+Tue Oct 25 22:17:13 CEST 2011 - vmiklos@vmiklos.hu
+
+- Add patch to be able to specify the color of the sidebar
+
+-------------------------------------------------------------------
+Thu Jul 7 11:26:18 UTC 2011 - werner@suse.de
+
+- Update patch for Mutt Ticket #3288 and check for empty headers
+ in mx_update_context() (bnx#704359)
+
+-------------------------------------------------------------------
+Mon Jun 20 15:11:39 CEST 2011 - werner@suse.de
+
+- Add patches for the following Mutt Tickets:
+ #1771: pipe-mime
+ #2179: score-match
+ #3240: imapuser
+ #3261: readonly-open
+ #3288: mx_update_context-segfault
+ #3293: dont-recode-saved-attachments
+ #3300: gpgme-1.2
+ #3324: smimekeys-tmpdir
+ #3326: emptycharset
+ #3335: thread-segfault
+ #3339: smime_keys-chaining
+ #3371: ansi-escape-segfault
+ #3378: references
+ #3457: pop3-segfault
+ #3459: split-fetches
+ #3483: header-strchr
+ #3496: no-implicit_autoview-for-text-html
+ #3506: gnutls-CN-validation
+ #3515: gnutls-deprecated-set-priority
+ #3516: gnutls-deprecated-verify-peers
+ with ticket #3506 bnc#700648 becomes fixed, with ticket #3496
+ the autoview regression for text/html should be fixed.
+- Add one line more for sidebar if displayed on top
+
+-------------------------------------------------------------------
+Fri Apr 15 14:15:02 CEST 2011 - werner@suse.de
+
+- Support offsets in 2gig mbox files even on 32bit architectures (bnc#676388)
+
+-------------------------------------------------------------------
+Thu Feb 3 02:00:55 CET 2011 - ro@suse.de
+
+- buildrequire gdbm-devel also on 11.4 to fix build
+
+-------------------------------------------------------------------
+Wed Feb 2 09:47:43 CET 2011 - werner@suse.de
+
+- Switch from buildrequires gpgme-devel to libgpgme-devel for 11.4
+- Work around missing buildrequires of libgpgme-devel by adding
+ libassuan-devel for 11.4
+
+-------------------------------------------------------------------
+Mon Jan 31 13:55:54 UTC 2011 - gber@opensuse.org
+
+- recommend smtp_daemon since mutt has builtin SMTP support
+
+-------------------------------------------------------------------
+Mon Jan 31 14:30:26 CET 2011 - werner@suse.de
+
+- Fix the orther sidebar patch as it is broken with MALLOC_CHECK=1
+ now static buffers are used instead (re)alloced arrays.
+
+-------------------------------------------------------------------
+Wed Jan 26 13:47:31 UTC 2011 - gber@opensuse.org
+
+- fix build by removing Makefiles from contrib
+- added missing %mime_database_post/%mime_database_postun
+
+-------------------------------------------------------------------
+Wed Jan 26 12:46:10 UTC 2011 - gber@opensuse.org
+
+- modified desktop file so mutt can be used as the default mailto
+ handler
+
+-------------------------------------------------------------------
+Fri Nov 26 19:44:20 CET 2010 - pth@suse.de
+
+- Update and fix the german translation.
+- Update all translations so that the user edits the right translation.
+
+-------------------------------------------------------------------
+Thu Nov 4 15:28:59 CET 2010 - werner@suse.de
+
+- Update to mutt version 1.5.21 which include last three fixes
+ * Beside this better support of S/MIME certificates
+- Use an other sidebar patch found for OpenBSD
+- Update our patches
+
+-------------------------------------------------------------------
+Mon May 10 20:37:10 UTC 2010 - guido+opensuse.org@berhoerster.name
+
+- add proper category to desktop file
+
+-------------------------------------------------------------------
+Mon Apr 19 11:46:56 UTC 2010 - lnussel@suse.de
+
+- fix build against openssl 1.0
+
+-------------------------------------------------------------------
+Wed Dec 2 12:38:04 CET 2009 - werner@suse.de
+
+- Do not fold From lines into wrong format (bnc#559525)
+
+-------------------------------------------------------------------
+Wed Nov 25 13:55:43 CET 2009 - werner@suse.de
+
+- Update for bnc#537141: do not add certificates with wrong hosts
+
+-------------------------------------------------------------------
+Tue Nov 3 19:09:32 UTC 2009 - coolo@novell.com
+
+- updated patches to apply with fuzz=0
+
+-------------------------------------------------------------------
+Wed Sep 9 13:43:58 CEST 2009 - werner@suse.de
++++ 874 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.mutt.3290.new/mutt.changes
New:
----
README.alternates
Signature_conversion
automake-1.12.patch
aw.listreply.diff
bsc907453-CVE-2014-9116-jessie.patch
bug-676388-largefile.patch
krb5-config
mutt-1.5.15-wrapcolumn.diff
mutt-1.5.20-gpgme_set_locale.patch
mutt-1.5.20-sendgroupreplyto.diff
mutt-1.5.21-cariage-return.path
mutt-1.5.21-opennfs.dif
mutt-1.5.21-patches.tar.bz2
mutt-1.5.21-tinfo.dif
mutt-1.5.21.de.po
mutt-1.5.21.dif
mutt-1.5.21.sidebar.20120829.patch
mutt-1.5.21.tar.bz2
mutt-1.5.9i-pgpewrap.diff
mutt-CVE-2014-0467.patch
mutt.changes
mutt.desktop
mutt.png
mutt.spec
nion.sidebar-color.diff
patch-1.5.21.rr.compressed.1.bz2
patch-1.5.21.vk.pgp_verbose_mime
patch-1.5.5.1.nt.xtitles.3.ab.1
skel.muttrc
widechar.sidebar.dif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mutt.spec ++++++
#
# spec file for package mutt
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: mutt
#!BuildIgnore: sendmail
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cyrus-sasl-devel
BuildRequires: cyrus-sasl-gssapi
BuildRequires: docbook-xsl-stylesheets
BuildRequires: docbook_4
BuildRequires: gdbm-devel
BuildRequires: glibc-i18ndata
BuildRequires: ispell
BuildRequires: krb5-devel
BuildRequires: libcom_err
%if 0%{?suse_version} <= 1230
BuildRequires: libgcrypt
%else
BuildRequires: libgcrypt-devel
%endif
BuildRequires: libgnutls-devel
BuildRequires: libgpg-error-devel
BuildRequires: libidn-devel
BuildRequires: libopenssl-devel
BuildRequires: libxml2
BuildRequires: libxslt
BuildRequires: lynx
BuildRequires: ncurses-devel
BuildRequires: postfix
BuildRequires: sgml-skel
BuildRequires: update-desktop-files
BuildRequires: xli
#if
%if 0%{?suse_version} > 1130
BuildRequires: libassuan-devel
BuildRequires: libgpgme-devel
%else
BuildRequires: gpgme-devel
%endif
Url: http://www.mutt.org
Provides: muttssl
Obsoletes: muttssl
Recommends: smtp_daemon
%if 0%{?suse_version} > 1130
Requires(post): shared-mime-info
Requires(postun): shared-mime-info
%endif
# NOTE: We don't want this dependency and desktop-data-SuSE is in all
# desktop selections.
#Requires: desktop-data-SuSE
Version: 1.5.21
Release: 33.2
Summary: Mail Program
License: GPL-2.0+
Group: Productivity/Networking/Email/Clients
# ftp://ftp.mutt.org/mutt/devel/
Source0: %name-%version.tar.bz2
Source1: Signature_conversion
Source2: README.alternates
Source3: mutt.png
Source4: mutt.desktop
Source5: skel.muttrc
Source6: krb5-config
Source7: mutt-1.5.21.de.po
Source8: %name-%version-patches.tar.bz2
Patch: %name-%version.dif
# http://www.spinnaker.de/mutt/compressed/
Patch1: patch-%version.rr.compressed.1.bz2
Patch2: %name-1.5.9i-pgpewrap.diff
Patch3: %name-1.5.20-sendgroupreplyto.diff
Patch4: %name-1.5.15-wrapcolumn.diff
Patch5: patch-1.5.5.1.nt.xtitles.3.ab.1
# http://lunar-linux.org/mutt-sidebar
Patch6: mutt-1.5.21.sidebar.20120829.patch
Patch7: mutt-1.5.21-opennfs.dif
Patch8: mutt-1.5.20-gpgme_set_locale.patch
Patch9: bug-676388-largefile.patch
Patch10: mutt-1.5.21-tinfo.dif
# http://www.wolfermann.org/mutt.html
Patch11: aw.listreply.diff
Patch12: patch-1.5.21.vk.pgp_verbose_mime
Patch13: automake-1.12.patch
Patch14: nion.sidebar-color.diff
# PATCH-FIX-OPENSUSE: bnc#813498 - mutt crashes in fgetwc in text_enriched_handler
Patch15: widechar.sidebar.dif
# PATCH-FIX-OPENSUSE: Be able to read signed/encrypted messsages even with CRLF
Patch16: mutt-1.5.21-cariage-return.path
Patch17: mutt-CVE-2014-0467.patch
# PATCH-FIX-SUSE: bsc#907453 - CVE-2014-9116: mutt: heap-based buffer overflow in mutt_substrdup()
Patch19: bsc907453-CVE-2014-9116-jessie.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir %{_sysconfdir}
%description
A very powerful mail user agent. It supports (among other nice things)
highlighting, threading, and PGP. It takes some time to get used to,
however.
%prep
%setup -q -n mutt-%version -b 8
for p in ../%name-%version-patches/*; do
test -e $p || break
echo Patch $p
patch -s -p1 < $p
done
%patch
%patch1 -p1 -b .compressed
%patch2 -p0 -b .pgpewrap
%patch3 -p1 -b .sendgroupreplyto
%patch4 -p0 -b .wrapcolumn
%patch5 -p1 -b .xtitles
%patch6 -p1 -b .sidebar
%patch7 -p0 -b .opennfs
%patch8 -p1 -b .gpgme
%patch9 -p1 -b .largefile
%patch10 -p0 -b .tinfo
%patch11 -p1 -b .listreply
%patch12 -p1 -b .pgp_verbose_mtime
%patch13 -p1 -b .automake-1.12
%patch14 -p1 -b .sidebar.color
%patch15 -p0 -b .widechar.sidebar
%patch16 -p0 -b .crlf
%patch17 -p1
%patch19 -p1 -b .cvw2014.9116
cp doc/Muttrc Muttrc.SuSE
cp %{S:2} .
%build
%if 0%{?suse_version} > 1100
autoreconf -fi
%endif
cflags ()
{
local flag=$1; shift
local var=$1; shift
test -n "${flag}" -a -n "${var}" || return
case "${!var}" in
*${flag}*) return
esac
set -o noclobber
case "$flag" in
-Wl,*)
if echo 'int main () { return 0; }' | \
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
;;
*)
if ${CC:-gcc} -Werror $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
esac
set +o noclobber
}
CC=gcc
CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE"
#cflags -DSUSE_IMAP_FORCE_SSL CFLAGS
cflags -std=gnu99 CFLAGS
cflags -fno-strict-aliasing CFLAGS
cflags -fstack-protector CFLAGS
cflags -g3 CFLAGS
cflags -pipe CFLAGS
cflags -Wl,--as-needed LDFLAGS
cflags -Wl,-O2 LDFLAGS
cflags -Wl,--hash-size=8599 LDFLAGS
KRB5CFGPATH=%{S:6}
export CC CFLAGS LDFLAGS KRB5CFGPATH
chmod 755 $KRB5CFGPATH
./configure $RPM_ARCH-suse-linux \
--prefix=%{_prefix} \
--datadir=%{_datadir} \
--sysconfdir=%{_sysconfdir} \
--mandir=%{_mandir} \
--with-docdir=%{_docdir}/%name \
--enable-imap \
--enable-pop \
--enable-pgp \
%if 0%{?suse_version} >= 1100
--enable-gpgme \
%endif
--enable-nfs-fix \
--enable-mailtool \
--enable-compressed \
--disable-external-dotlock \
--with-ssl=%{_prefix} \
--with-sasl=%{_prefix} \
--with-gss=%{_prefix} \
--with-gnutls=%{_prefix} \
--with-curses=%{_prefix} \
--with-regex \
--enable-smtp \
--enable-hcache \
--with-idn
make -C doc clean
make -C po update-po
cp %{S:7} po/de.po
make
make -C doc
%install
make install DESTDIR=%{buildroot}
mv Muttrc.SuSE %{buildroot}%{_sysconfdir}/Muttrc
install -m 755 %{S:1} %{buildroot}%{_bindir}
gzip -9 doc/manu*.txt
rm -f contrib/Makefile*
# datadir not automatically created:
mkdir -p %{buildroot}%{_datadir}/mutt
# INSTALL file should be removed:
rm -rf %{buildroot}%{_docdir}/%{name}/INSTALL
# mbox/mmdf manual page conflicts with the one from tin, so rename it
mv %{buildroot}%{_mandir}/man5/mbox.5 \
%{buildroot}%{_mandir}/man5/mbox_mutt.5
mv %{buildroot}%{_mandir}/man5/mmdf.5 \
%{buildroot}%{_mandir}/man5/mmdf_mutt.5
%find_lang %name
# We get mime.types from aaa_base
rm -f %{buildroot}%{_sysconfdir}/mime.types
# Mutt BTS is gone
rm -f %{buildroot}%{_mandir}/man1/{flea*,muttbug*}
rm -f %{buildroot}%{_bindir}/{flea,muttbug}
rm -f %{buildroot}%{_sysconfdir}/Muttrc.dist
rm -f %{buildroot}%{_sysconfdir}/mime.types.dist
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/
mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.muttrc
%suse_update_desktop_file mutt
#%fdupes %{buildroot}
%if 0%{?suse_version} >= 1140
%post
%mime_database_post
%postun
%mime_database_postun
%endif
%files -f %name.lang
%defattr(-,root,root)
%doc doc/manual*.html doc/manual.txt.gz COPYRIGHT README* NEWS TODO
%doc doc/PGP-Notes.txt doc/applying-patches.txt doc/devel-notes.txt
%doc contrib/
%config(noreplace) %{_sysconfdir}/skel/.muttrc
%{_bindir}/mutt
%{_bindir}/pgpewrap
%{_bindir}/pgpring
%{_bindir}/smime_keys
%{_bindir}/Signature_conversion
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/mutt.png
%{_mandir}/man1/mutt.1.gz
%{_mandir}/man1/smime_keys.1.gz
%{_mandir}/man5/mmdf_mutt.5.gz
%{_mandir}/man5/muttrc.5.gz
%{_mandir}/man5/mbox_mutt.5.gz
%{_datadir}/mutt
%config(noreplace) %{_sysconfdir}/Muttrc
%changelog
++++++ README.alternates ++++++
Since Mutt version 1.5.6 there's changes with regards to the $alternates
variable. It's no longer a variable, but a command.
When it before was: set alternates=foo@bar.org
It's now: alternates foo@bar.org
It's elaborated in the alternates section of the manpage muttrc.5
++++++ Signature_conversion ++++++
#!/bin/sh
#
# Wed May 7 14:36:35 2003 Mike FABIAN
SIGFILE=$1
if [ ! -e $SIGFILE ] ; then
# there is no such signature file, do nothing
exit 0
fi
guess_legacy_encoding () {
# Guess the legacy encoding used by the language/country
# found in the current LC_CTYPE value.
# First determine the LC_CTYPE locale category setting
ctype="en_US"
ctype=${LC_ALL-${LC_CTYPE-${LANG-${ctype}}}}
case $ctype in
zh_TW*)
LEGACY_ENCODING=Big5
;;
zh_HK*)
LEGACY_ENCODING=Big5HKSCS
;;
zh*)
LEGACY_ENCODING=GB2312
;;
ja*)
LEGACY_ENCODING=EUC-JP
;;
ko*)
LEGACY_ENCODING=EUC-KR
;;
ru*)
LEGACY_ENCODING=KOI8-R
;;
uk*)
LEGACY_ENCODING=KOI8-U
;;
pl*|hr*|hu*|cs*|sk*|sl*)
LEGACY_ENCODING=ISO-8859-2
;;
eo*|mt*)
LEGACY_ENCODING=ISO-8859-3
;;
el*)
LEGACY_ENCODING=ISO-8859-7
;;
he*)
LEGACY_ENCODING=ISO-8859-8
;;
tr*)
LEGACY_ENCODING=ISO-8859-9
;;
th*)
LEGACY_ENCODING=TIS-620 # or ISO-8859-11
;;
lt*)
LEGACY_ENCODING=ISO-8859-13
;;
cy*)
LEGACY_ENCODING=ISO-8859-14
;;
ro*)
LEGACY_ENCODING=ISO-8859-14 # or ISO-8859-16
;;
am*|vi*)
LEGACY_ENCODING=UTF-8
;;
*)
LEGACY_ENCODING=ISO-8859-1
;;
esac
}
guess_legacy_encoding;
LOCALE_CHARMAP=$(locale charmap)
for encoding in UTF-8 $LOCALE_CHARMAP $LEGACY_ENCODING ISO-8859-1
do
if iconv --from $encoding --to $LOCALE_CHARMAP < $SIGFILE > /dev/null 2>&1 ; then
iconv --from $encoding --to $LOCALE_CHARMAP < $SIGFILE
exit 0
fi
done
# unknown encoding in signature file, print it to stdout unchanged:
# (should never happen because the conversion from ISO-8859-1 should
# never return a failure).
cat $SIGFILE
++++++ automake-1.12.patch ++++++
Index: mutt-1.5.21/configure.ac
===================================================================
--- mutt-1.5.21.orig/configure.ac
+++ mutt-1.5.21/configure.ac
@@ -27,7 +27,6 @@ AC_MSG_RESULT($mutt_cv_prefix)
AC_PROG_CC
AC_ISC_POSIX
-AM_C_PROTOTYPES
if test "x$U" != "x"; then
AC_MSG_ERROR(Compiler not ANSI compliant)
fi
++++++ aw.listreply.diff ++++++
ask when sending list message replies to author only - Armin Wolfermann (aw)
Index: mutt-1.5.21/PATCHES
===================================================================
--- mutt-1.5.21.orig/PATCHES 2012-06-21 11:48:06.757181997 +0200
+++ mutt-1.5.21/PATCHES 2012-06-21 11:48:50.352837436 +0200
@@ -1,3 +1,4 @@
+patch-1.5.9.aw.listreply.1
patch-1.5.21.sidebar.20120829.txt
patch-1.5.19.rr.compressed.1
patch-1.5.5.1.nt.xtitles.3.ab.1
Index: mutt-1.5.21/init.h
===================================================================
--- mutt-1.5.21.orig/init.h 2012-06-21 11:48:06.754181952 +0200
+++ mutt-1.5.21/init.h 2012-06-21 11:48:22.426417566 +0200
@@ -1331,6 +1331,13 @@ struct option_t MuttVars[] = {
** The locale used by \fCstrftime(3)\fP to format dates. Legal values are
** the strings your system accepts for the locale environment variable \fC$$$LC_TIME\fP.
*/
+ { "list_reply", DT_QUAD, R_NONE, OPT_LISTREPLY, M_NO },
+ /*
+ ** .pp
+ ** When set, address replies to the mailing list the original message came
+ ** from (instead to the author only). Setting this option to ``ask-yes'' or
+ ** ``ask-no'' will ask if you really intended to reply to the author only.
+ */
{ "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 },
/*
** .pp
Index: mutt-1.5.21/mutt.h
===================================================================
--- mutt-1.5.21.orig/mutt.h 2012-06-21 11:48:06.788182463 +0200
+++ mutt-1.5.21/mutt.h 2012-06-21 11:48:22.426417566 +0200
@@ -290,6 +290,7 @@ enum
#endif
OPT_SUBJECT,
OPT_VERIFYSIG, /* verify PGP signatures */
+ OPT_LISTREPLY,
/* THIS MUST BE THE LAST VALUE. */
OPT_MAX
Index: mutt-1.5.21/send.c
===================================================================
--- mutt-1.5.21.orig/send.c 2012-06-21 11:48:06.724181501 +0200
+++ mutt-1.5.21/send.c 2012-06-21 11:48:22.426417566 +0200
@@ -453,6 +453,7 @@ static int include_reply (CONTEXT *ctx,
static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto)
{
char prompt[STRING];
+ ADDRESS *tmp;
if (flags && env->mail_followup_to && hmfupto == M_YES)
{
@@ -466,6 +467,23 @@ static int default_to (ADDRESS **to, ENV
if (flags & SENDLISTREPLY)
return 0;
+ /* If this message came from a mailing list, ask the user if he really
+ * intended to reply to the author only.
+ */
+ if (!(flags & SENDGROUPREPLY) && mutt_is_list_cc (0, env->to, env->cc)) {
+ switch (query_quadoption (OPT_LISTREPLY,
+ _("Message came from a mailing list. Reply to author only?")))
+ {
+ case M_NO:
+ tmp = find_mailing_lists (env->to, env->cc);
+ rfc822_append (to, tmp, 0);
+ rfc822_free_address (&tmp);
+ return 0;
+ case -1:
+ return -1; /* abort */
+ }
+ }
+
if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from))
{
/* mail is from the user, assume replying to recipients */
++++++ bsc907453-CVE-2014-9116-jessie.patch ++++++
This patch solves the issue raised by CVE-2014-9116 in bug 771125.
We correctly redefine what are the whitespace characters as per RFC5322; by
doing so we prevent mutt_substrdup from being used in a way that could lead to
a segfault.
The lib.c part was written by Antonio Radici to prevent
crashes due to this kind of bugs from happening again.
The wheezy version of this patch is slightly different, therefore this patch
has -jessie prefixed in its name.
Index: mutt/lib.c
===================================================================
--- mutt/lib.c
+++ mutt/lib.c
@@ -819,6 +819,9 @@ char *mutt_substrdup (const char *begin,
size_t len;
char *p;
+ if (end != NULL && end < begin)
+ return NULL;
+
if (end)
len = end - begin;
else
Index: mutt/sendlib.c
===================================================================
--- mutt/sendlib.c
+++ mutt/sendlib.c
@@ -1814,7 +1814,11 @@ static int write_one_header (FILE *fp, i
{
tagbuf = mutt_substrdup (start, t);
++t; /* skip over the colon separating the header field name and value */
- SKIPWS(t); /* skip over any leading whitespace */
+
+ /* skip over any leading whitespace (WSP, as defined in RFC5322) */
+ while (*t == ' ' || *t == '\t')
+ t++;
+
valbuf = mutt_substrdup (t, end);
}
dprint(4,(debugfile,"mwoh: buf[%s%s] too long, "
++++++ bug-676388-largefile.patch ++++++
diff -ur orig.010003/mutt-1.5.21/crypt-gpgme.c mutt-1.5.21/crypt-gpgme.c
--- orig.010003/mutt-1.5.21/crypt-gpgme.c 2010-09-13 19:19:55.000000000 +0200
+++ mutt-1.5.21/crypt-gpgme.c 2011-03-02 18:18:01.000000000 +0100
@@ -461,7 +461,7 @@
/* Create a GPGME data object from the stream FP but limit the object
to LENGTH bytes starting at OFFSET bytes from the beginning of the
file. */
-static gpgme_data_t file_to_data_object (FILE *fp, long offset, long length)
+static gpgme_data_t file_to_data_object (FILE *fp, LOFF_T offset, long length)
{
int err = 0;
gpgme_data_t data;
@@ -2156,7 +2156,7 @@
{
int needpass = -1, pgp_keyblock = 0;
int clearsign = 0;
- long start_pos = 0;
+ LOFF_T start_pos = 0;
long bytes;
LOFF_T last_pos, offset;
char buf[HUGE_STRING];
diff -ur orig.010003/mutt-1.5.21/handler.c mutt-1.5.21/handler.c
--- orig.010003/mutt-1.5.21/handler.c 2009-08-25 21:08:52.000000000 +0200
+++ mutt-1.5.21/handler.c 2011-03-02 18:12:28.000000000 +0100
@@ -1520,7 +1520,7 @@
FILE *fp = NULL;
char tempfile[_POSIX_PATH_MAX];
handler_t handler = NULL;
- long tmpoffset = 0;
+ LOFF_T tmpoffset = 0;
size_t tmplength = 0;
char type[STRING];
int rc = 0;
diff -ur orig.010003/mutt-1.5.21/mh.c mutt-1.5.21/mh.c
--- orig.010003/mutt-1.5.21/mh.c 2010-08-24 18:34:21.000000000 +0200
+++ mutt-1.5.21/mh.c 2011-03-02 18:48:36.000000000 +0100
@@ -1493,9 +1493,9 @@
char newpath[_POSIX_PATH_MAX];
char partpath[_POSIX_PATH_MAX];
- long old_body_offset = h->content->offset;
- long old_body_length = h->content->length;
- long old_hdr_lines = h->lines;
+ LOFF_T old_body_offset = h->content->offset;
+ LOFF_T old_body_length = h->content->length;
+ LOFF_T old_hdr_lines = h->lines;
if ((dest = mx_open_new_message (ctx, h, 0)) == NULL)
return -1;
diff -ur orig.010003/mutt-1.5.21/mutt.h mutt-1.5.21/mutt.h
--- orig.010003/mutt-1.5.21/mutt.h 2010-09-13 19:19:55.000000000 +0200
+++ mutt-1.5.21/mutt.h 2011-03-02 17:52:03.000000000 +0100
@@ -625,7 +625,7 @@
PARAMETER *parameter; /* parameters of the content-type */
char *description; /* content-description */
char *form_name; /* Content-Disposition form-data name param */
- long hdr_offset; /* offset in stream where the headers begin.
+ LOFF_T hdr_offset; /* offset in stream where the headers begin.
* this info is used when invoking metamail,
* where we need to send the headers of the
* attachment
diff -ur orig.010003/mutt-1.5.21/pgp.c mutt-1.5.21/pgp.c
--- orig.010003/mutt-1.5.21/pgp.c 2010-09-13 19:19:55.000000000 +0200
+++ mutt-1.5.21/pgp.c 2011-03-02 18:48:08.000000000 +0100
@@ -251,7 +251,7 @@
int needpass = -1, pgp_keyblock = 0;
int clearsign = 0, rv, rc;
int c = 1; /* silence GCC warning */
- long start_pos = 0;
+ LOFF_T start_pos = 0;
long bytes;
LOFF_T last_pos, offset;
char buf[HUGE_STRING];
diff -ur orig.010003/mutt-1.5.21/smime.c mutt-1.5.21/smime.c
--- orig.010003/mutt-1.5.21/smime.c 2010-09-13 19:19:55.000000000 +0200
+++ mutt-1.5.21/smime.c 2011-03-02 18:12:08.000000000 +0100
@@ -1546,7 +1546,7 @@
pid_t thepid;
int badsig = -1;
- long tmpoffset = 0;
+ LOFF_T tmpoffset = 0;
size_t tmplength = 0;
int origType = sigbdy->type;
char *savePrefix = NULL;
@@ -1660,7 +1660,7 @@
{
int len=0;
int c;
- long last_pos;
+ LOFF_T last_pos;
char buf[HUGE_STRING];
char outfile[_POSIX_PATH_MAX], errfile[_POSIX_PATH_MAX];
char tmpfname[_POSIX_PATH_MAX];
@@ -1865,7 +1865,7 @@
char tempfile[_POSIX_PATH_MAX];
STATE s;
- long tmpoffset = b->offset;
+ LOFF_T tmpoffset = b->offset;
size_t tmplength = b->length;
int origType = b->type;
FILE *tmpfp=NULL;
++++++ krb5-config ++++++
#!/bin/bash
unset CFLAGS
/usr/lib/mit/bin/krb5-config ${1+"$@"} | sed -e 's/-Wl[^[:blank:]]+//g'
++++++ mutt-1.5.15-wrapcolumn.diff ++++++
Index: init.h
===================================================================
--- init.h.orig
+++ init.h
@@ -3308,7 +3308,8 @@ struct option_t MuttVars[] = {
** When \fIset\fP, mutt will weed headers when displaying, forwarding,
** printing, or replying to messages.
*/
- { "wrap", DT_NUM, R_PAGER, UL &Wrap, 0 },
+ { "wrap", DT_NUM, R_PAGER, UL &Wrap, 0 },
+ { "wrapcolumn", DT_SYN, R_NONE, UL "wrap", 0 },
/*
** .pp
** When set to a positive value, mutt will wrap text at $$wrap characters.
++++++ mutt-1.5.20-gpgme_set_locale.patch ++++++
Index: mutt-1.5.20/crypt-gpgme.c
===================================================================
--- mutt-1.5.20/crypt-gpgme.c 2009-05-19 02:11:35.000000000 +0200
+++ mutt-1.5.20/crypt-gpgme.c 2009-07-14 14:43:43.000000000 +0200
@@ -344,6 +344,7 @@ static gpgme_ctx_t create_gpgme_context
if (!GpgmeLocaleSet)
{
+ gpgme_check_version(NULL);
gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
#ifdef ENABLE_NLS
gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
++++++ mutt-1.5.20-sendgroupreplyto.diff ++++++
--- mutt-1.5.20/init.h
+++ mutt-1.5.20/init.h 2009-06-26 00:00:00.000000000 +0200
@@ -2399,6 +2399,13 @@ struct option_t MuttVars[] = {
** .pp
** Also see the $$force_name variable.
*/
+ { "send_group_reply_to", DT_BOOL, R_NONE, OPTSENDGROUPREPLYTO, 0 },
+ /*
+ ** .pp
+ ** This variable controls how group replies are done.
+ ** When set, all recepients listet in "To:" are set in the
+ ** "To:" header again, else in the "CC", which is the default.
+ */
{ "score", DT_BOOL, R_NONE, OPTSCORE, 1 },
/*
** .pp
--- mutt-1.5.20/mutt.h
+++ mutt-1.5.20/mutt.h 2009-06-26 00:00:00.000000000 +0200
@@ -417,6 +417,7 @@ enum
OPTSAVEADDRESS,
OPTSAVEEMPTY,
OPTSAVENAME,
+ OPTSENDGROUPREPLYTO,
OPTSCORE,
OPTSIGDASHES,
OPTSIGONTOP,
--- mutt-1.5.20/send.c
+++ mutt-1.5.20/send.c 2009-06-26 12:24:12.832816460 +0200
@@ -558,8 +558,16 @@ int mutt_fetch_recips (ENVELOPE *out, EN
if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != M_YES))
{
/* if(!mutt_addr_is_user(in->to)) */
+ if (option (OPTSENDGROUPREPLYTO))
+ {
+ rfc822_append (&out->to, in->to, 0);
+ rfc822_append (&out->cc, in->cc, 1);
+ }
+ else
+ {
rfc822_append (&out->cc, in->to, 1);
rfc822_append (&out->cc, in->cc, 1);
+ }
}
}
return 0;
++++++ mutt-1.5.21-cariage-return.path ++++++
--- crypt-gpgme.c
+++ crypt-gpgme.c 2013-05-29 09:31:53.141939173 +0000
@@ -2003,12 +2003,12 @@ static int pgp_check_traditional_one_bod
{
if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15))
{
- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
+ if (!mutt_strxcmp ("MESSAGE-----\n", buf + 15))
{
enc = 1;
break;
}
- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
+ else if (!mutt_strxcmp ("SIGNED MESSAGE-----\n", buf + 15))
{
sgn = 1;
break;
@@ -2196,14 +2196,14 @@ int pgp_gpgme_application_handler (BODY
clearsign = 0;
start_pos = last_pos;
- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
+ if (!mutt_strxcmp ("MESSAGE-----\n", buf + 15))
needpass = 1;
- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
+ else if (!mutt_strxcmp ("SIGNED MESSAGE-----\n", buf + 15))
{
clearsign = 1;
needpass = 0;
}
- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
+ else if (!mutt_strxcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
{
needpass = 0;
pgp_keyblock = 1;
--- lib.c
+++ lib.c 2013-05-29 09:31:53.325439198 +0000
@@ -875,6 +875,18 @@ int mutt_strcmp(const char *a, const cha
return strcmp(NONULL(a), NONULL(b));
}
+int mutt_strxcmp(const char *a, const char *b)
+{
+ size_t xa, xb;
+ xa = strcspn(NONULL(a), "\r\n");
+ xb = strcspn(NONULL(b), "\r\n");
+ if (xb != xa)
+ return -1;
+ if (!xa)
+ return 0;
+ return strncmp(NONULL(a), NONULL(b), xa);
+}
+
int mutt_strcasecmp(const char *a, const char *b)
{
return strcasecmp(NONULL(a), NONULL(b));
--- lib.h
+++ lib.h 2013-05-29 09:25:21.805439324 +0000
@@ -179,6 +179,7 @@ int mutt_copy_bytes (FILE *, FILE *, siz
int mutt_rx_sanitize_string (char *, size_t, const char *);
int mutt_strcasecmp (const char *, const char *);
int mutt_strcmp (const char *, const char *);
+int mutt_strxcmp (const char *, const char *);
int mutt_strncasecmp (const char *, const char *, size_t);
int mutt_strncmp (const char *, const char *, size_t);
int mutt_strcoll (const char *, const char *);
--- pager.c
+++ pager.c 2013-05-29 09:31:53.433440090 +0000
@@ -771,7 +771,7 @@ resolve_types (char *buf, char *raw, str
else if (check_attachment_marker ((char *) raw) == 0)
lineInfo[n].type = MT_COLOR_ATTACHMENT;
#endif
- else if (mutt_strcmp ("-- \n", buf) == 0 || mutt_strcmp ("-- \r\n", buf) == 0)
+ else if (mutt_strxcmp ("-- \n", buf) == 0)
{
i = n + 1;
--- pgp.c
+++ pgp.c 2013-05-29 09:31:53.461439587 +0000
@@ -287,14 +287,14 @@ int pgp_application_pgp_handler (BODY *m
clearsign = 0;
start_pos = last_pos;
- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
+ if (mutt_strxcmp ("MESSAGE-----\n", buf + 15) == 0)
needpass = 1;
- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
+ else if (mutt_strxcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
{
clearsign = 1;
needpass = 0;
}
- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
+ else if (!mutt_strxcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
{
needpass = 0;
pgp_keyblock = 1;
@@ -327,10 +327,10 @@ int pgp_application_pgp_handler (BODY *m
fputs (buf, tmpfp);
- if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) ||
+ if ((needpass && mutt_strxcmp ("-----END PGP MESSAGE-----\n", buf) == 0) ||
(!needpass
- && (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0
- || mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0)))
+ && (mutt_strxcmp ("-----END PGP SIGNATURE-----\n", buf) == 0
+ || mutt_strxcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0)))
break;
/* remember optional Charset: armor header as defined by RfC4880 */
if (mutt_strncmp ("Charset: ", buf, 9) == 0)
@@ -552,11 +552,11 @@ static int pgp_check_traditional_one_bod
{
if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0)
{
- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
+ if (mutt_strxcmp ("MESSAGE-----\n", buf + 15) == 0)
enc = 1;
- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
+ else if (mutt_strxcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0)
sgn = 1;
- else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
+ else if (mutt_strxcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
key = 1;
}
}
@@ -1065,9 +1065,9 @@ BODY *pgp_sign_message (BODY *a)
*/
while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL)
{
- if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
+ if (mutt_strxcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0)
fputs ("-----BEGIN PGP SIGNATURE-----\n", fp);
- else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0)
+ else if (mutt_strxcmp("-----END PGP MESSAGE-----\n", buffer) == 0)
fputs ("-----END PGP SIGNATURE-----\n", fp);
else
fputs (buffer, fp);
++++++ mutt-1.5.21-opennfs.dif ++++++
--- Makefile.am
+++ Makefile.am 2009-03-02 23:00:00.000000000 +0000
@@ -27,7 +27,7 @@ mutt_SOURCES = \
edit.c enter.c flags.c init.c filter.c from.c \
getdomain.c group.c \
handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
- main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
+ main.c mbox.c menu.c mh.c mx.c opennfs.c pager.c parse.c pattern.c \
postpone.c query.c recvattach.c recvcmd.c \
rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
score.c send.c sendlib.c signal.c sort.c \
@@ -83,7 +83,7 @@ mutt_dotlock_SOURCES = mutt_dotlock.c
mutt_dotlock_LDADD = @LIBOBJS@
mutt_dotlock_DEPENDENCIES = @LIBOBJS@
-pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c
+pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c opennfs.c md5.c pgppacket.c ascii.c
pgpring_LDADD = @LIBOBJS@ $(INTLLIBS)
pgpring_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
--- Makefile.in
+++ Makefile.in 2009-03-03 16:00:38.000000000 +0000
@@ -77,7 +77,7 @@ am_mutt_OBJECTS = addrbook.$(OBJEXT) ali
hash.$(OBJEXT) hdrline.$(OBJEXT) headers.$(OBJEXT) \
help.$(OBJEXT) hook.$(OBJEXT) keymap.$(OBJEXT) main.$(OBJEXT) \
mbox.$(OBJEXT) menu.$(OBJEXT) mh.$(OBJEXT) mx.$(OBJEXT) \
- pager.$(OBJEXT) parse.$(OBJEXT) pattern.$(OBJEXT) \
+ opennfs.$(OBJEXT) pager.$(OBJEXT) parse.$(OBJEXT) pattern.$(OBJEXT) \
postpone.$(OBJEXT) query.$(OBJEXT) recvattach.$(OBJEXT) \
recvcmd.$(OBJEXT) rfc822.$(OBJEXT) rfc1524.$(OBJEXT) \
rfc2047.$(OBJEXT) rfc2231.$(OBJEXT) rfc3676.$(OBJEXT) \
@@ -105,7 +105,7 @@ pgpewrap_LDADD = $(LDADD)
pgpewrap_DEPENDENCIES = @LIBOBJS@
am_pgpring_OBJECTS = pgppubring.$(OBJEXT) pgplib.$(OBJEXT) \
lib.$(OBJEXT) extlib.$(OBJEXT) sha1.$(OBJEXT) md5.$(OBJEXT) \
- pgppacket.$(OBJEXT) ascii.$(OBJEXT)
+ pgppacket.$(OBJEXT) ascii.$(OBJEXT) opennfs.$(OBJEXT)
pgpring_OBJECTS = $(am_pgpring_OBJECTS)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -354,7 +354,7 @@ mutt_SOURCES = \
edit.c enter.c flags.c init.c filter.c from.c \
getdomain.c group.c \
handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
- main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
+ main.c mbox.c menu.c mh.c mx.c opennfs.c pager.c parse.c pattern.c \
postpone.c query.c recvattach.c recvcmd.c \
rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
score.c send.c sendlib.c signal.c sort.c \
--- lib.c
+++ lib.c 2009-03-02 23:00:00.000000000 +0000
@@ -50,6 +50,7 @@
#define EX_OK 0
#endif
+#include "mutt.h"
#include "lib.h"
@@ -632,6 +633,10 @@ int safe_open (const char *path, int fla
struct stat osb, nsb;
int fd;
+#if defined(__linux__)
+ if ((fd = opennfs (path, flags, 0600)) < 0)
+ return fd;
+#else
if (flags & O_EXCL)
{
char safe_file[_POSIX_PATH_MAX];
@@ -655,7 +660,7 @@ int safe_open (const char *path, int fla
if ((fd = open (path, flags & ~O_EXCL, 0600)) < 0)
return fd;
-
+#endif
/* make sure the file is not symlink */
if (lstat (path, &osb) < 0 || fstat (fd, &nsb) < 0 ||
compare_stat(&osb, &nsb) == -1)
--- mbox.c
+++ mbox.c 2010-11-04 14:01:04.775926675 +0000
@@ -782,7 +782,7 @@ int mbox_sync_mailbox (CONTEXT *ctx, int
/* Create a temporary file to write the new version of the mailbox in. */
mutt_mktemp (tempfile, sizeof (tempfile));
- if ((i = open (tempfile, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1 ||
+ if ((i = opennfs (tempfile, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1 ||
(fp = fdopen (i, "w")) == NULL)
{
if (-1 != i)
--- mh.c
+++ mh.c 2009-03-02 23:00:00.000000000 +0000
@@ -277,7 +277,11 @@ static int mh_mkstemp (CONTEXT * dest, F
{
snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d",
dest->path, NONULL (Hostname), (int) getpid (), Counter++);
+#if defined(__linux__)
+ if ((fd = opennfs (path, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1)
+#else
if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
+#endif
{
if (errno != EEXIST)
{
@@ -1290,8 +1294,11 @@ int maildir_open_new_message (MESSAGE *
dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
path));
-
+#if defined(__linux__)
+ if ((fd = opennfs (path, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1)
+#else
if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
+#endif
{
if (errno != EEXIST)
{
--- mutt.h
+++ mutt.h 2009-03-02 23:00:00.000000000 +0000
@@ -972,4 +972,5 @@ typedef struct
#include "lib.h"
#include "globals.h"
+extern int opennfs(const char *, int, int);
#endif /*MUTT_H*/
--- opennfs.c
+++ opennfs.c 2009-03-02 23:00:00.000000000 +0000
@@ -0,0 +1,122 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifndef NFS_SUPER_MAGIC
+# define NFS_SUPER_MAGIC 0x6969
+#endif
+
+int opennfs(const char *path, int flags, int mode)
+{
+ char tmplock[NFS_MAXPATHLEN+1], sysname[256];
+ char *slash, *ptr, *dir, *base, *clear = (char*)0;
+ struct stat ps, ts;
+ struct statfs fs;
+ ssize_t len;
+ int ret;
+
+ if ((flags & (O_WRONLY|O_RDWR)) == 0)
+ goto safe;
+
+ if ((flags & (O_EXCL|O_CREAT)) != (O_EXCL|O_CREAT))
+ goto safe;
+
+#if defined(O_NOFOLLOW)
+ flags |= O_NOFOLLOW;
+#endif
+
+ ret = -1;
+ if ((clear = strdup(path)) == (char*)0)
+ goto err;
+ dir = dirname(clear);
+
+ if ((ret = (statfs(dir, &fs))) < 0)
+ goto err;
+
+ if (fs.f_type != NFS_SUPER_MAGIC)
+ goto safe;
+
+ if ((ret = gethostname(sysname, sizeof(sysname))) < 0)
+ goto err;
+
+ ret = -1;
+ ptr = &tmplock[0];
+ if (((len = snprintf(ptr, NFS_MAXPATHLEN, "%s/.%s-XXXXXX", dir, sysname)) < 0) || (len >= NFS_MAXPATHLEN))
+ goto err;
+ ptr += len;
+ slash = ptr;
+
+ free(clear);
+ clear = (char*)0;
+
+ if (mkdtemp(tmplock) == (char*)0)
+ goto err;
+
+ ret = -1;
+ if ((clear = strdup(path)) == (char*)0)
+ goto rmd;
+ base = basename(clear);
+
+ ret = -1;
+ if (((len = snprintf(ptr, NFS_MAXPATHLEN - len, "/%s", base)) < 0) || (len >= (NFS_MAXPATHLEN - len)))
+ goto rmd;
+
+ free(clear);
+ clear = (char*)0;
+
+ if ((ret = open(tmplock, flags, mode)) < 0)
+ goto rmd;
+
+ errno = 0;
+ do {
+ len = write(ret, "0", 2);
+ } while ((len < 0) && (errno == EINTR));
+ close(ret);
+
+ ret = -1;
+ errno = EBADF;
+ if (len != 2)
+ goto unl;
+
+ errno = 0;
+ if ((ret = lstat(tmplock, &ts)) < 0)
+ goto unl;
+
+ if (((ret = link(tmplock, path)) < 0) && (errno == EEXIST))
+ goto unl;
+
+ if ((ret = lstat(path, &ps)) < 0)
+ goto unl;
+
+ ret = -1;
+ errno = EEXIST;
+ if (ps.st_nlink != 2)
+ goto unl;
+ if ((ps.st_rdev != ts.st_rdev) || (ps.st_ino != ts.st_ino))
+ goto unl;
+
+ errno = 0;
+ flags |= O_TRUNC;
+ flags &= ~(O_EXCL|O_CREAT);
+ ret = open(path, flags, mode);
+unl:
+ unlink(tmplock);
+rmd:
+ *slash = '\0';
+ rmdir(tmplock);
+err:
+ if (clear) free(clear);
+ return ret;
+safe:
+ if (clear) free(clear);
+ return open(path, flags, mode);
+}
--- sendlib.c
+++ sendlib.c 2009-03-02 23:00:00.000000000 +0000
@@ -2216,7 +2216,7 @@ send_msg (const char *path, char **args,
if (SendmailWait >= 0 && tempfile && *tempfile)
{
/* *tempfile will be opened as stdout */
- if (open (*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
+ if (opennfs (*tempfile, O_WRONLY | O_CREAT | O_EXCL, 0600) < 0)
_exit (S_ERR);
/* redirect stderr to *tempfile too */
if (dup (1) < 0)
++++++ mutt-1.5.21-tinfo.dif ++++++
--- configure.ac
+++ configure.ac 2011-11-22 12:48:52.319147493 +0000
@@ -274,9 +274,14 @@ main ()
do
AC_CHECK_LIB($lib, waddnwstr, [cf_ncurses="$lib"; break])
done
+ cf_tinfo=""
+ AC_CHECK_LIB(tinfo, tgetent, [cf_tinfo="tinfo"])
AC_CHECK_LIB($cf_ncurses, initscr,
- [MUTTLIBS="$MUTTLIBS -l$cf_ncurses"
-
+ [if test x$cf_tinfo = x ; then
+ MUTTLIBS="$MUTTLIBS -l$cf_ncurses"
+ else
+ MUTTLIBS="$MUTTLIBS -l$cf_ncurses -l$cf_tinfo"
+ fi
if test "$cf_ncurses" = ncursesw; then
AC_CHECK_HEADERS(ncursesw/ncurses.h,[cf_cv_ncurses_header="ncursesw/ncurses.h"])
else
++++++ mutt-1.5.21.de.po ++++++
++++ 5166 lines (skipped)
++++++ mutt-1.5.21.dif ++++++
--- configure.ac
+++ configure.ac 2007-06-01 10:57:38.000000000 +0000
@@ -235,7 +235,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"
@@ -660,8 +660,12 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-
else
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"
@@ -730,8 +734,12 @@ AC_ARG_WITH(sasl, AC_HELP_STRING([--with
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
saved_LIBS="$LIBS"
--- doc/Makefile.in
+++ doc/Makefile.in 2010-11-04 13:01:17.839926726 +0000
@@ -575,7 +575,7 @@ uninstall-local:
check:
manual.txt: manual.html
- -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \
+ -LC_ALL=C lynx -dont_wrap_pre -center -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \
LC_ALL=C w3m -dump manual.html > $@ || \
LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@
--- doc/Muttrc.head
+++ doc/Muttrc.head 2007-06-01 10:51:04.000000000 +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 -iM @docdir@/manual.txt<Enter>" "show Mutt documentation"
# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
--- doc/Muttrc
+++ doc/Muttrc 2009-03-03 14:56:33.000000000 +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 /usr/local/share/doc/mutt/manual.txt<Enter>" "show Mutt documentation"
+macro generic,index,pager <F1> "<shell-escape> less -iM /usr/share/doc/packages/mutt/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>?<toggle-mailboxes>" "show incoming mailboxes list"
@@ -364,9 +364,9 @@ attachments -I message/external-body
# unset, you must first use the <tag-prefix> function (bound to ``;''
# by default) to make the next function apply to all tagged messages.
#
-#
-# set autoedit=no
-#
+
+set autoedit=yes
+
# Name: autoedit
# Type: boolean
# Default: no
@@ -482,9 +482,9 @@ attachments -I message/external-body
# Note: It should only be set in case Mutt isn't able to determine the
# character set used correctly.
#
-#
-# set check_mbox_size=no
-#
+
+set check_mbox_size=yes
+
# Name: check_mbox_size
# Type: boolean
# Default: no
@@ -870,11 +870,11 @@ attachments -I message/external-body
# filtered message is read from the standard output.
#
#
-# set dotlock_program="/usr/local/bin/mutt_dotlock"
+# set dotlock_program="/usr/bin/mutt_dotlock"
#
# Name: dotlock_program
# Type: path
-# Default: "/usr/local/bin/mutt_dotlock"
+# Default: "/usr/bin/mutt_dotlock"
#
#
# Contains the path of the mutt_dotlock(8) binary to be used by
@@ -2288,9 +2288,9 @@ attachments -I message/external-body
# directly from the pager, and screen resizes cause lines longer than
# the screen width to be badly formatted in the help menu.
#
-#
-# set pager_context=0
-#
+
+set pager_context=4
+
# Name: pager_context
# Type: number
# Default: 0
@@ -2318,9 +2318,9 @@ attachments -I message/external-body
# pager. The valid sequences are listed in the $index_format
# section.
#
-#
-# set pager_index_lines=0
-#
+
+set pager_index_lines=10
+
# Name: pager_index_lines
# Type: number
# Default: 0
@@ -2338,9 +2338,9 @@ attachments -I message/external-body
# is less than $pager_index_lines, then the index will only use as
# many lines as it needs.
#
-#
-# set pager_stop=no
-#
+
+set pager_stop=yes
+
# Name: pager_stop
# Type: boolean
# Default: no
@@ -3306,9 +3306,9 @@ attachments -I message/external-body
# (possibly undeleted) message whenever a command that modifies the
# current message is executed.
#
-#
-# set reverse_alias=no
-#
+
+set reverse_alias=yes
+
# Name: reverse_alias
# Type: boolean
# Default: no
@@ -3440,6 +3440,18 @@ attachments -I message/external-body
# Also see the $force_name variable.
#
#
+# set send_group_reply_to=no
+#
+# Name: send_group_reply_to
+# Type: boolean
+# Default: no
+#
+#
+# This variable controls how group replies are done.
+# When set, all recepients listet in "To:" are set in the
+# "To:" header again, else in the "CC", which is the default.
+#
+#
# set score=yes
#
# Name: score
@@ -4011,9 +4023,9 @@ attachments -I message/external-body
# Setting this variable overrides the value of the $sendmail
# variable.
#
-#
-# set sort=date
-#
+
+set sort=reverse-date-sent
+
# Name: sort
# Type: sort order
# Default: date
@@ -4457,9 +4469,9 @@ attachments -I message/external-body
# When set, mutt uses the date received rather than the date sent
# to thread messages by subject.
#
-#
-# set tilde=no
-#
+
+set tilde=yes
+
# Name: tilde
# Type: boolean
# Default: no
@@ -4770,6 +4782,42 @@ attachments -I message/external-body
# in this case.
#
#
+# set xterm_icon="M%?n?AIL&ail?"
+#
+# Name: xterm_icon
+# Type: string
+# Default: "M%?n?AIL&ail?"
+#
+#
+# Controls the format of the icon title, as long as xterm_set_titles
+# is enabled. This string is identical in formatting to the one used by
+# ``$status_format''.
+#
+#
+# set xterm_set_titles=no
+#
+# Name: xterm_set_titles
+# Type: boolean
+# Default: no
+#
+#
+# Controls whether mutt sets the xterm title bar and icon name
+# (as long as you're in an appropriate terminal). The default must
+# be off to force in the validity checking.
+#
+#
+# set xterm_title="Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?"
+#
+# Name: xterm_title
+# Type: string
+# Default: "Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?"
+#
+#
+# Controls the format of the title bar of the xterm provided that
+# xterm_set_titles has been set. This string is identical in formatting
+# to the one used by ``$status_format''.
+#
+#
# set write_inc=10
#
# Name: write_inc
--- imap/auth.c
+++ imap/auth.c 2006-11-09 15:19:56.000000000 +0000
@@ -72,6 +72,23 @@ int imap_authenticate (IMAP_DATA* idata)
dprint (2, (debugfile, "imap_authenticate: Trying method %s\n", method));
authenticator = imap_authenticators;
+#ifdef USE_SASL
+ /* "login" not supported by SASL */
+ if (!ascii_strcasecmp ("login", method))
+ {
+ while (authenticator->authenticate)
+ {
+ char* identify = authenticator->method;
+ if (identify && !ascii_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 ||
@@ -85,6 +102,9 @@ int imap_authenticate (IMAP_DATA* idata)
authenticator++;
}
+#ifdef USE_SASL
+ }
+#endif
}
FREE (&methods);
--- init.h
+++ init.h 2009-06-25 15:52:10.000000000 +0000
@@ -2944,6 +2944,9 @@ struct option_t 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_SSLSTARTTLS, M_YES },
/*
** .pp
--- mx.c
+++ mx.c 2011-07-07 11:24:48.680426606 +0000
@@ -1591,6 +1591,9 @@ void mx_update_context (CONTEXT *ctx, in
{
h = ctx->hdrs[msgno];
+ if (!h)
+ continue;
+
if (WithCrypto)
{
/* NOTE: this _must_ be done before the check for mailcap! */
++++++ mutt-1.5.21.sidebar.20120829.patch ++++++
++++ 2376 lines (skipped)
++++++ mutt-1.5.9i-pgpewrap.diff ++++++
--- pgpewrap.c
+++ pgpewrap.c
@@ -47,6 +47,10 @@
}
*opt = NULL;
+ if (opts[0] == NULL) {
+ fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", argv[0]);
+ return 1;
+ }
execvp(opts[0], opts);
perror(argv[0]);
return 2;
++++++ mutt-CVE-2014-0467.patch ++++++
Index: mutt-1.5.17/copy.c
===================================================================
--- mutt-1.5.17.orig/copy.c
+++ mutt-1.5.17/copy.c
@@ -254,6 +254,7 @@ mutt_copy_hdr (FILE *in, FILE *out, LOFF
{
if (!address_header_decode (&this_one))
rfc2047_decode (&this_one);
+ this_one_len = mutt_strlen (this_one);
}
if (!headers[x])
++++++ mutt.desktop ++++++
[Desktop Entry]
Categories=ConsoleOnly;Network;Email
Encoding=UTF-8
Exec=mutt %u
Icon=mutt
Type=Application
Name=Mutt
GenericName=Mail Client
Terminal=true
MimeType=x-scheme-handler/mailto;
++++++ nion.sidebar-color.diff ++++++
diff --git a/color.c b/color.c
index bb6cbb4..bbf20a3 100644
--- a/color.c
+++ b/color.c
@@ -95,6 +95,7 @@ static struct mapping_t Fields[] =
{ "index", MT_COLOR_INDEX },
{ "sidebar_new", MT_COLOR_NEW },
{ "sidebar_flagged", MT_COLOR_FLAGGED },
+ { "sidebar", MT_COLOR_SIDEBAR },
{ NULL, 0 }
};
@@ -144,6 +145,7 @@ void ci_start_color (void)
/* set some defaults */
ColorDefs[MT_COLOR_STATUS] = A_REVERSE;
+ ColorDefs[MT_COLOR_SIDEBAR] = A_REVERSE;
ColorDefs[MT_COLOR_INDICATOR] = A_REVERSE;
ColorDefs[MT_COLOR_SEARCH] = A_REVERSE;
ColorDefs[MT_COLOR_MARKERS] = A_REVERSE;
diff --git a/mutt_curses.h b/mutt_curses.h
index 5f61048..cb1acf2 100644
--- a/mutt_curses.h
+++ b/mutt_curses.h
@@ -125,6 +125,7 @@ enum
MT_COLOR_ATTACHMENT,
MT_COLOR_SEARCH,
MT_COLOR_BOLD,
+ MT_COLOR_SIDEBAR,
MT_COLOR_UNDERLINE,
MT_COLOR_INDEX,
MT_COLOR_NEW,
diff --git a/sidebar.c b/sidebar.c
index 9e12319..4b37b76 100644
--- a/sidebar.c
+++ b/sidebar.c
@@ -250,13 +250,14 @@
}
/* get attributes for divider */
- SETCOLOR(MT_COLOR_STATUS);
+ SETCOLOR(MT_COLOR_SIDEBAR);
#ifndef USE_SLANG_CURSES
attr_get(&attrs, &color_pair, 0);
#else
color_pair = attr_get();
#endif
SETCOLOR(MT_COLOR_NORMAL);
+ /* SETCOLOR(MT_COLOR_SIDEBAR); */
/* draw the divider */
@@ -266,10 +267,14 @@
for ( ; lines < SidebarHeight; lines++ ) {
move(lines, SidebarWidth - delim_len);
- addstr(NONULL(SidebarDelim));
-#ifndef USE_SLANG_CURSES
- mvchgat(lines, SidebarWidth - delim_len, delim_len, 0, color_pair, NULL);
-#endif
+ if (option (OPTASCIICHARS))
+ addstr (NONULL (SidebarDelim));
+ else if (!option (OPTASCIICHARS) && !strcmp (NONULL(SidebarDelim), "|"))
+ addch (ACS_VLINE);
+ else if ((Charset_is_utf8) && !strcmp (NONULL(SidebarDelim), "|"))
+ addstr ("\342\224\202");
+ else
+ addstr (NONULL (SidebarDelim));
}
if ( Incoming == 0 ) return 0;
++++++ patch-1.5.21.vk.pgp_verbose_mime ++++++
diff -rupN a/globals.h b/globals.h
--- a/globals.h 2009-08-26 03:08:52.000000000 +0800
+++ b/globals.h 2012-04-11 12:52:44.826523028 +0800
@@ -227,6 +227,8 @@ WHERE REGEXP PgpGoodSign;
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
WHERE char *PgpEntryFormat;
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
WHERE char *PgpClearSignCommand;
WHERE char *PgpDecodeCommand;
WHERE char *PgpVerifyCommand;
diff -rupN a/init.h b/init.h
--- a/init.h 2010-09-15 23:39:31.000000000 +0800
+++ b/init.h 2012-04-11 12:52:44.825523029 +0800
@@ -2556,6 +2556,18 @@ struct option_t MuttVars[] = {
** a line quoted text if it also matches $$smileys. This mostly
** happens at the beginning of a line.
*/
+ { "pgp_mime_signature_filename", DT_STR, R_NONE, UL &PgpMimeSignatureFilename, UL "signature.asc"},
+ /*
+ ** .pp
+ ** This option sets the filename used for signature parts in PGP/MIME
+ ** signed messages.
+ */
+ { "pgp_mime_signature_description", DT_STR, R_NONE, UL &PgpMimeSignatureDescription, UL "Digital signature"},
+ /*
+ ** .pp
+ ** This option sets the Content-Description used for signature parts in
+ ** PGP/MIME signed messages.
+ */
diff -rupN a/PATCHES b/PATCHES
--- a/PATCHES 2008-03-20 04:07:06.000000000 +0800
+++ b/PATCHES 2012-04-11 12:52:44.824523030 +0800
@@ -0,0 +1 @@
+patch-1.5.3.vk.pgp_verbose_mime
diff -rupN a/pgp.c b/pgp.c
--- a/pgp.c 2010-09-14 01:19:55.000000000 +0800
+++ b/pgp.c 2012-04-11 12:52:44.825523029 +0800
@@ -1129,6 +1129,8 @@ BODY *pgp_sign_message (BODY *a)
t->disposition = DISPNONE;
t->encoding = ENC7BIT;
t->unlink = 1; /* ok to remove this file after sending. */
+ mutt_set_parameter ("name", PgpMimeSignatureFilename, &t->parameter);
+ t->description = safe_strdup (PgpMimeSignatureDescription);
return (a);
}
++++++ patch-1.5.5.1.nt.xtitles.3.ab.1 ++++++
Index: mutt-1.5.20/PATCHES
===================================================================
--- mutt-1.5.20.orig/PATCHES
+++ mutt-1.5.20/PATCHES
@@ -1 +1,2 @@
patch-1.5.19.rr.compressed.1
+patch-1.5.5.1.nt.xtitles.3.ab.1
Index: mutt-1.5.20/curs_main.c
===================================================================
--- mutt-1.5.20.orig/curs_main.c
+++ mutt-1.5.20/curs_main.c
@@ -110,6 +110,19 @@ static const char *No_visible = N_("No v
extern size_t UngetCount;
+#define ASCII_CTRL_G 0x07
+#define ASCII_CTRL_OPEN_SQUARE_BRAKET 0x1b
+
+void set_xterm_title_bar(char *title)
+{
+ fprintf(stderr ,"%c]2;%s%c", ASCII_CTRL_OPEN_SQUARE_BRAKET, title, ASCII_CTRL_G);
+}
+
+void set_xterm_icon_name(char *name)
+{
+ fprintf(stderr, "%c]1;%s%c", ASCII_CTRL_OPEN_SQUARE_BRAKET, name, ASCII_CTRL_G);
+}
+
void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num)
{
format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX;
@@ -566,6 +579,13 @@ int mutt_index_menu (void)
SETCOLOR (MT_COLOR_NORMAL);
BKGDSET (MT_COLOR_NORMAL);
menu->redraw &= ~REDRAW_STATUS;
+ if (option(OPTXTERMSETTITLES))
+ {
+ menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle));
+ set_xterm_title_bar(buf);
+ menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon));
+ set_xterm_icon_name(buf);
+ }
}
menu->redraw = 0;
Index: mutt-1.5.20/globals.h
===================================================================
--- mutt-1.5.20.orig/globals.h
+++ mutt-1.5.20/globals.h
@@ -141,6 +141,8 @@ WHERE char *Tempdir;
WHERE char *Tochars;
WHERE char *Username;
WHERE char *Visual;
+WHERE char *XtermTitle;
+WHERE char *XtermIcon;
WHERE char *CurrentFolder;
WHERE char *LastFolder;
Index: mutt-1.5.20/init.c
===================================================================
--- mutt-1.5.20.orig/init.c
+++ mutt-1.5.20/init.c
@@ -1833,6 +1833,26 @@ static int parse_set (BUFFER *tmp, BUFFE
toggle_option (MuttVars[idx].data);
else
set_option (MuttVars[idx].data);
+
+ /* sanity check for xterm */
+ if ((mutt_strcmp (MuttVars[idx].option, "xterm_set_titles") == 0)
+ && option (OPTXTERMSETTITLES))
+ {
+ char *ep = getenv ("TERM");
+ /* Make sure that the terminal can take the control codes */
+ if (ep == NULL) unset_option (MuttVars[idx].data);
+ else if (mutt_strncasecmp (ep, "xterm", 5) &&
+ mutt_strncasecmp (ep, "color-xterm", 11) &&
+ mutt_strncasecmp (ep, "eterm", 5) &&
+ mutt_strncasecmp (ep, "kterm", 5) &&
+ mutt_strncasecmp (ep, "nxterm", 6) &&
+ mutt_strncasecmp (ep, "putty", 5) &&
+ mutt_strncasecmp (ep, "screen", 6) &&
+ mutt_strncasecmp (ep, "cygwin", 6) &&
+ mutt_strncasecmp (ep, "rxvt", 4) )
+ unset_option (MuttVars[idx]. data);
+
+ }
}
else if (myvar || DTYPE (MuttVars[idx].type) == DT_STR ||
DTYPE (MuttVars[idx].type) == DT_PATH ||
Index: mutt-1.5.20/init.h
===================================================================
--- mutt-1.5.20.orig/init.h
+++ mutt-1.5.20/init.h
@@ -3348,6 +3348,27 @@ struct option_t MuttVars[] = {
** Also see the $$read_inc, $$net_inc and $$time_inc variables and the
** ``$tuning'' section of the manual for performance considerations.
*/
+ {"xterm_icon", DT_STR, R_BOTH, UL &XtermIcon, UL "M%?n?AIL&ail?"},
+ /*
+ ** .pp
+ ** Controls the format of the icon title, as long as xterm_set_titles
+ ** is enabled. This string is identical in formatting to the one used by
+ ** ``$$status_format''.
+ */
+ {"xterm_set_titles", DT_BOOL, R_BOTH, OPTXTERMSETTITLES, 0},
+ /*
+ ** .pp
+ ** Controls whether mutt sets the xterm title bar and icon name
+ ** (as long as you're in an appropriate terminal). The default must
+ ** be off to force in the validity checking.
+ */
+ {"xterm_title", DT_STR, R_BOTH, UL &XtermTitle, UL "Mutt with %?m?%m messages&no messages?%?n? [%n NEW]?"},
+ /*
+ ** .pp
+ ** Controls the format of the title bar of the xterm provided that
+ ** xterm_set_titles has been set. This string is identical in formatting
+ ** to the one used by ``$$status_format''.
+ */
/*--*/
{ NULL, 0, 0, 0, 0 }
};
Index: mutt-1.5.20/mutt.h
===================================================================
--- mutt-1.5.20.orig/mutt.h
+++ mutt-1.5.20/mutt.h
@@ -452,6 +452,7 @@ enum
OPTWRAPSEARCH,
OPTWRITEBCC, /* write out a bcc header? */
OPTXMAILER,
+ OPTXTERMSETTITLES,
OPTCRYPTUSEGPGME,
OPTCRYPTUSEPKA,
Index: mutt-1.5.20/pager.c
===================================================================
--- mutt-1.5.20.orig/pager.c
+++ mutt-1.5.20/pager.c
@@ -1784,6 +1784,13 @@ mutt_pager (const char *banner, const ch
}
BKGDSET (MT_COLOR_NORMAL);
SETCOLOR (MT_COLOR_NORMAL);
+ if (option(OPTXTERMSETTITLES))
+ {
+ menu_status_line (buffer, sizeof (buffer), index, NONULL (XtermTitle));
+ set_xterm_title_bar(buffer);
+ menu_status_line (buffer, sizeof (buffer), index, NONULL (XtermIcon));
+ set_xterm_icon_name(buffer);
+ }
}
if ((redraw & REDRAW_INDEX) && index)
Index: mutt-1.5.20/mutt_menu.h
===================================================================
--- mutt-1.5.20.orig/mutt_menu.h
+++ mutt-1.5.20/mutt_menu.h
@@ -112,4 +112,7 @@ int mutt_menuLoop (MUTTMENU *);
void index_make_entry (char *, size_t, struct menu_t *, int);
int index_color (int);
+void set_xterm_title_bar(char *);
+void set_xterm_icon_name(char *);
+
#endif /* _MUTT_MENU_H_ */
++++++ skel.muttrc ++++++
# Sample ~/.muttrc for SuSE Linux
# Setting
set pager_context=4
set pager_index_lines=10
set pager_stop
# Binding
bind pager <backspace> previous-page
bind pager - previous-line
bind pager \eOm previous-line
bind pager + next-line
bind pager \eOk next-line
bind pager \eOM next-line
bind pager \e[1~ top
bind pager \e[4~ bottom
bind index <backspace> previous-entry
bind index - previous-entry
bind index \eOm previous-entry
bind index + next-entry
bind index \eOk next-entry
bind index \eOM display-message
bind index \e[H first-entry
bind index \e[F last-entry
bind index \e[1~ first-entry
bind index \e[4~ last-entry
bind alias <space> select-entry
bind alias x exit
bind attach x exit
bind browser x exit
# What headers to show
ignore *
unignore from: date subject to cc reply-to:
unignore resent- x-resent
# What order to show them
unhdr_order *
hdr_order Date: From: To: Reply-To: Cc: Subject:
# On to the colors
color attachment blue default
color header green default "^message-id:"
color header green default "^x-mailer:"
color header green default "^user-agent:"
color header blue default "^date: "
color header brightblue default "^from: "
color header green default "^subject: "
color header brightblue default "^to: "
color header brightblue default "^cc: "
color header brightblue default "^reply-to: "
color index green default ~F
color index red default ~D
color index blue default ~T
color index brightblue default ~N
color indicator brightwhite blue
color markers red default
color quoted magenta default
color signature brightblue default
color status brightwhite green
color tilde cyan default
color tree blue default
color body black default "(^| )_[-a-z0-9_]+_[,.?]?[ \n]"
# Command formats for gpg.
#
# This version uses gpg-2comp from
# http://muppet.faveve.uni-stuttgart.de/~gero/gpg-2comp.tar.gz
#
# $Id: gpg.rc,v 3.1 2002/03/26 22:23:58 roessler Exp $
#
# %p The empty string when no passphrase is needed,
# the string "PGPPASSFD=0" if one is needed.
#
# This is mostly used in conditional % sequences.
#
# %f Most PGP commands operate on a single file or a file
# containing a message. %f expands to this file's name.
#
# %s When verifying signatures, there is another temporary file
# containing the detached signature. %s expands to this
# file's name.
#
# %a In "signing" contexts, this expands to the value of the
# configuration variable $pgp_sign_as. You probably need to
# use this within a conditional % sequence.
#
# %r In many contexts, mutt passes key IDs to pgp. %r expands to
# a list of key IDs.
# Note that we explicitly set the comment armor header since GnuPG, when used
# in some localiaztion environments, generates 8bit data in that header, thereby
# breaking PGP/MIME.
# decode application/pgp
set pgp_decode_command="/usr/bin/gpg --charset utf-8 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
# verify a pgp/mime signature
set pgp_verify_command="/usr/bin/gpg --no-verbose --quiet --batch --output - --verify %s %f"
# decrypt a pgp/mime attachment
set pgp_decrypt_command="/usr/bin/gpg --passphrase-fd 0 --no-verbose --quiet --batch --output - %f"
# create a pgp/mime signed attachment
# set pgp_sign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_sign_command="/usr/bin/gpg --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
# create a application/pgp signed (old-style) message
# set pgp_clearsign_command="/usr/bin/gpg-2comp --comment '' --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_clearsign_command="/usr/bin/gpg --charset utf-8 --no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
# create a pgp/mime encrypted attachment
# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_only_command="pgpewrap /usr/bin/gpg --charset utf-8 --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
# create a pgp/mime encrypted and signed attachment
# set pgp_encrypt_sign_command="pgpewrap gpg-2comp --passphrase-fd 0 -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap /usr/bin/gpg --charset utf-8 --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
# import a key into the public key ring
set pgp_import_command="/usr/bin/gpg --no-verbose --import -v %f"
# export a key from the public key ring
set pgp_export_command="/usr/bin/gpg --no-verbose --export --armor %r"
# verify a key
set pgp_verify_key_command="/usr/bin/gpg --verbose --batch --fingerprint --check-sigs %r"
# read in the public key ring
set pgp_list_pubring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
# read in the secret key ring
set pgp_list_secring_command="/usr/bin/gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
# fetch keys
# set pgp_getkeys_command="pkspxycwrap %r"
# pattern for good signature - may need to be adapted to locale!
set pgp_good_sign="^gpg: Good signature from"
# OK, here's a version which uses gnupg's message catalog:
# set pgp_good_sign="`gettext -d gnupg -s 'Good signature from "' | tr -d '"'`"
++++++ widechar.sidebar.dif ++++++
--- handler.c
+++ handler.c 2013-04-22 00:00:00.000000000 +0000
@@ -778,7 +778,7 @@ static void enriched_set_flags (const wc
static int text_enriched_handler (BODY *a, STATE *s)
{
enum {
- TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
+ TEXT, TEXT_GOTWC, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
} state = TEXT;
long bytes = a->length;
@@ -807,7 +807,7 @@ static int text_enriched_handler (BODY *
{
if (state != ST_EOF)
{
- if (!bytes || (wc = fgetwc (s->fpin)) == WEOF)
+ if (state != TEXT_GOTWC && (!bytes || (fscanf (s->fpin, "%lc", &wc)) == EOF))
state = ST_EOF;
else
bytes--;
@@ -815,6 +815,8 @@ static int text_enriched_handler (BODY *
switch (state)
{
+ case TEXT_GOTWC:
+ state = TEXT;
case TEXT :
switch (wc)
{
@@ -875,9 +877,8 @@ static int text_enriched_handler (BODY *
enriched_flush (&stte, 1);
else
{
- ungetwc (wc, s->fpin);
bytes++;
- state = TEXT;
+ state = TEXT_GOTWC;
}
break;
@@ -1490,7 +1491,7 @@ void mutt_decode_attachment (BODY *b, ST
* strip all trailing spaces to improve interoperability;
* if $text_flowed is unset, simply verbatim copy input
*/
-static int text_plain_handler (BODY *b, STATE *s)
+static int text_plain_handler (BODY *b __attribute__((unused)), STATE *s)
{
char *buf = NULL;
size_t l = 0, sz = 0;
@@ -1518,7 +1519,6 @@ int mutt_body_handler (BODY *b, STATE *s
int decode = 0;
int plaintext = 0;
FILE *fp = NULL;
- char tempfile[_POSIX_PATH_MAX];
handler_t handler = NULL;
LOFF_T tmpoffset = 0;
size_t tmplength = 0;
@@ -1528,6 +1528,8 @@ int mutt_body_handler (BODY *b, STATE *s
#ifdef HAVE_FMEMOPEN
char *temp;
size_t tempsize;
+#else
+ char tempfile[_POSIX_PATH_MAX];
#endif
int oflags = s->flags;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org