Package: mutt
Version: 1.5.18-6+b1
Severity: normal
Hi,
I have encountered a little bit awkward behavior when mutt opens
attachment in external viewer (according to mailcap). The problem is
caused by mutt creating read-write temp file for the attachment which can
be misinterpreted by viewer to enable editing as well.
I do understand that viewer is not supposed to enable editing, but this
is happening. Just as one example consider OpenOffice and doc/odt
attachment. I ended up with lost changes (2h of work) because I thought
that mutt would keep the file if it had been changed after opening.
If the tmp file was read-only from the beginning then even editor
wouldn't allow me to edit it.
I have hacked my use case by the following simple patch:
--- mutt-1.5.18.orig/attach.c 2009-05-11 17:22:38.000000000 +0200
+++ mutt-1.5.18/attach.c 2009-05-11 17:24:24.000000000 +0200
@@ -494,6 +494,11 @@ int mutt_view_attachment (FILE *fp, BODY
goto return_error;
}
+ /* chmod tmp file to read-only because we don't want to enable
+ * viewers which are editors as well to change the content which
+ * will be thrown away after we close it.
+ */
+ chmod(tempfile, 0400);
use_pipe = rfc1524_expand_command (a, tempfile, type,
command, sizeof (command));
use_pager = entry->copiousoutput;
I don't consider it to be the real fix, but maybe it can help with
resolution.
Thanks in advance.
-- Package-specific info:
Mutt 1.5.18 (2008-05-17)
Copyright (C) 1996-2008 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.
System: Linux 2.6.30-rc4-99ee12973e5fd1123ed1779fb4d11ac7d381d430 (i686)
ncurses: ncurses 5.7.20090404 (compiled with 5.7)
libidn: 1.14 (compiled with 1.14)
hcache backend: GDBM version 1.8.3. 10/15/2002 (built Aug 27 2008 09:23:18)
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE
+USE_FCNTL -USE_FLOCK
+USE_POP +USE_IMAP +USE_SMTP +USE_GSS -USE_SSL_OPENSSL +USE_SSL_GNUTLS
+USE_SASL +HAVE_GETADDRINFO
+HAVE_REGCOMP -USE_GNU_REGEX
+HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET
+HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME -CRYPT_BACKEND_GPGME
-EXACT_ADDRESS -SUN_ATTACHMENT
+ENABLE_NLS -LOCALES_HACK +COMPRESSED +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_YESEXPR
+HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to <[email protected]>.
To report a bug, please visit http://bugs.mutt.org/.
patch-1.5.13.cd.ifdef.2
patch-1.5.13.cd.purge_message.3.4
patch-1.5.13.nt+ab.xtitles.4
patch-1.5.18.sidebar.20080611.txt
patch-1.5.4.vk.pgp_verbose_mime
patch-1.5.6.dw.maildir-mtime.1
patch-1.5.8.hr.sensible_browser_position.3
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-rc4-99ee12973e5fd1123ed1779fb4d11ac7d381d430 (SMP w/2 CPU
cores; PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash
Versions of packages mutt depends on:
ii libc6 2.9-4 GNU C Library: Shared libraries
ii libcomerr2 1.41.3-1 common error description library
ii libgdbm3 1.8.3-4 GNU dbm database routines (runtime
ii libgnutls26 2.6.4-2 the GNU TLS library - runtime libr
ii libgssapi-krb5-2 1.6.dfsg.4~beta1-13 MIT Kerberos runtime libraries - k
ii libidn11 1.14-3 GNU Libidn library, implementation
ii libk5crypto3 1.6.dfsg.4~beta1-13 MIT Kerberos runtime libraries - C
ii libkrb5-3 1.6.dfsg.4~beta1-13 MIT Kerberos runtime libraries
ii libncursesw5 5.7+20090404-1 shared libraries for terminal hand
ii libsasl2-2 2.1.22.dfsg1-23+b1 Cyrus SASL - authentication abstra
Versions of packages mutt recommends:
ii locales 2.9-4 GNU C Library: National Language (
ii mime-support 3.44-1 MIME files 'mime.types' & 'mailcap
ii postfix [mail-transport-agent 2.5.5-1.1 High-performance mail transport ag
Versions of packages mutt suggests:
ii aspell 0.60.6-1 GNU Aspell spell-checker
ii ca-certificates 20081127 Common CA certificates
ii gnupg 1.4.9-4 GNU privacy guard - a free PGP rep
ii ispell 3.1.20.0-4.4 International Ispell (an interacti
pn mixmaster <none> (no description available)
ii openssl 0.9.8g-16 Secure Socket Layer (SSL) binary a
pn urlview <none> (no description available)
Versions of packages mutt is related to:
ii mutt 1.5.18-6+b1 text-based mailreader supporting M
pn mutt-dbg <none> (no description available)
ii mutt-patched 1.5.18-6+b1 the Mutt Mail User Agent with extr
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]