- update to 1.5.16

This commit is contained in:
Miroslav Lichvar 2007-06-11 12:14:06 +00:00
parent 7cab1ae097
commit 8f46bdc039
9 changed files with 58 additions and 457 deletions

View File

@ -1,2 +1,2 @@
urlview-0.9.tar.gz
mutt-1.5.14.tar.gz
mutt-1.5.16.tar.gz

View File

@ -1,31 +0,0 @@
--- mutt-1.5.13/doc/manual.xml.head.manual 2007-02-07 14:05:47.000000000 +0100
+++ mutt-1.5.13/doc/manual.xml.head 2007-02-07 14:05:47.000000000 +0100
@@ -4886,7 +4886,7 @@
<para>
When you add an attachment to your mail message, Mutt searches your
personal mime.types file at <literal>&dollar;&lcub;HOME&rcub;/.mime.types</literal>, and then
-the system mime.types file at <literal>/usr/local/share/mutt/mime.types</literal> or
+the system mime.types file at <literal>/usr/share/mutt/mime.types</literal> or
<literal>/etc/mime.types</literal>
</para>
@@ -4943,7 +4943,7 @@
is a colon delimited list set to
<screen>
-${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
+${HOME}/.mailcap:/usr/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
</screen>
where <literal>&dollar;HOME</literal> is your home directory.
--- mutt-1.5.13/init.h.manual 2007-02-07 14:05:47.000000000 +0100
+++ mutt-1.5.13/init.h 2007-02-07 14:05:47.000000000 +0100
@@ -82,7 +82,7 @@
/* build complete documentation */
-#ifdef _MAKEDOC
+#if 0
# ifndef USE_IMAP
# define USE_IMAP
# endif

View File

@ -1,299 +0,0 @@
--- mutt-1.5.14/buffy.c.checkmboxsize 2006-11-19 06:17:27.000000000 +0100
+++ mutt-1.5.14/buffy.c 2007-03-13 16:22:15.000000000 +0100
@@ -45,8 +45,6 @@
static short BuffyCount = 0; /* how many boxes with new mail */
static short BuffyNotify = 0; /* # of unnotified new boxes */
-#ifdef BUFFY_SIZE
-
/* Find the last message in the file.
* upon success return 0. If no message found - return -1 */
@@ -142,7 +140,7 @@
struct stat sb;
struct stat tmp_sb;
- if (stat (path,&sb) != 0)
+ if (!option(OPTCHECKMBOXSIZE) || stat (path,&sb) != 0)
return NULL;
for (tmp = Incoming; tmp; tmp = tmp->next)
@@ -167,15 +165,12 @@
b->size = 0;
return;
}
-#endif
int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *err)
{
BUFFY **tmp,*tmp1;
char buf[_POSIX_PATH_MAX];
-#ifdef BUFFY_SIZE
struct stat sb;
-#endif /* BUFFY_SIZE */
while (MoreArgs (s))
{
@@ -232,31 +227,28 @@
(*tmp)->notified = 1;
(*tmp)->newly_created = 0;
-#ifdef BUFFY_SIZE
- /* for buffy_size, it is important that if the folder is new (tested by
+ /* for check_mbox_size, it is important that if the folder is new (tested by
* reading it), the size is set to 0 so that later when we check we see
- * that it increased . without buffy_size we probably don't care.
+ * that it increased . without check_mbox_size we probably don't care.
*/
- if (stat ((*tmp)->path, &sb) == 0 && !test_new_folder ((*tmp)->path))
+ if (option(OPTCHECKMBOXSIZE) &&
+ stat ((*tmp)->path, &sb) == 0 && !test_new_folder ((*tmp)->path))
{
/* some systems out there don't have an off_t type */
(*tmp)->size = (long) sb.st_size;
}
else
(*tmp)->size = 0;
-#endif /* BUFFY_SIZE */
}
return 0;
}
-#ifdef BUFFY_SIZE
-/* people use buffy_size on systems where modified time attributes are BADLY
- * broken. Ignore them.
+/* people use check_mbox_size on systems where modified time attributes are
+ * BADLY broken. Ignore them.
*/
-#define STAT_CHECK (sb.st_size > tmp->size)
-#else
-#define STAT_CHECK (sb.st_mtime > sb.st_atime || (tmp->newly_created && sb.st_ctime == sb.st_mtime && sb.st_ctime == sb.st_atime))
-#endif /* BUFFY_SIZE */
+#define STAT_CHECK_SIZE (sb.st_size > tmp->size)
+#define STAT_CHECK_TIME (sb.st_mtime > sb.st_atime || (tmp->newly_created && sb.st_ctime == sb.st_mtime && sb.st_ctime == sb.st_atime))
+#define STAT_CHECK (option(OPTCHECKMBOXSIZE) ? STAT_CHECK_SIZE : STAT_CHECK_TIME)
int mutt_buffy_check (int force)
{
@@ -323,9 +315,7 @@
* be ready for when it does. */
tmp->newly_created = 1;
tmp->magic = 0;
-#ifdef BUFFY_SIZE
tmp->size = 0;
-#endif
continue;
}
#ifdef USE_IMAP
@@ -365,13 +355,11 @@
BuffyCount++;
tmp->new = 1;
}
-#ifdef BUFFY_SIZE
else
{
/* some other program has deleted mail from the folder */
tmp->size = (long) sb.st_size;
}
-#endif
if (tmp->newly_created &&
(sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime))
tmp->newly_created = 0;
@@ -407,10 +395,8 @@
break;
}
}
-#ifdef BUFFY_SIZE
else if (Context && Context->path)
tmp->size = (long) sb.st_size; /* update the size */
-#endif
if (!tmp->new)
tmp->notified = 0;
--- mutt-1.5.14/commands.c.checkmboxsize 2006-12-07 23:40:19.000000000 +0100
+++ mutt-1.5.14/commands.c 2007-03-13 16:22:15.000000000 +0100
@@ -40,9 +40,7 @@
#include "imap.h"
#endif
-#ifdef BUFFY_SIZE
#include "buffy.h"
-#endif
#include <errno.h>
#include <unistd.h>
@@ -703,11 +701,8 @@
char prompt[SHORT_STRING], buf[_POSIX_PATH_MAX];
CONTEXT ctx;
struct stat st;
-#ifdef BUFFY_SIZE
BUFFY *tmp = NULL;
-#else
struct utimbuf ut;
-#endif
*redraw = 0;
@@ -842,11 +837,9 @@
if (need_buffy_cleanup)
{
-#ifdef BUFFY_SIZE
tmp = mutt_find_mailbox (buf);
if (tmp && !tmp->new)
mutt_update_mailbox (tmp);
-#else
/* fix up the times so buffy won't get confused */
if (st.st_mtime > st.st_atime)
{
@@ -856,7 +849,6 @@
}
else
utime (buf, NULL);
-#endif
}
mutt_clear_error ();
--- mutt-1.5.14/mx.c.checkmboxsize 2006-08-16 19:21:06.000000000 +0200
+++ mutt-1.5.14/mx.c 2007-03-13 16:22:15.000000000 +0100
@@ -38,9 +38,7 @@
#include "pop.h"
#endif
-#ifdef BUFFY_SIZE
#include "buffy.h"
-#endif
#ifdef USE_DOTLOCK
#include "dotlock.h"
@@ -57,9 +55,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#ifndef BUFFY_SIZE
#include <utime.h>
-#endif
#define mutt_is_spool(s) (mutt_strcmp (Spoolfile, s) == 0)
@@ -426,9 +422,7 @@
}
else if ((f = fopen (path, "r")) != NULL)
{
-#ifndef BUFFY_SIZE
struct utimbuf times;
-#endif
fgets (tmp, sizeof (tmp), f);
if (mutt_strncmp ("From ", tmp, 5) == 0)
@@ -436,7 +430,7 @@
else if (mutt_strcmp (MMDF_SEP, tmp) == 0)
magic = M_MMDF;
safe_fclose (&f);
-#ifndef BUFFY_SIZE
+
/* need to restore the times here, the file was not really accessed,
* only the type was accessed. This is important, because detection
* of "new mail" depends on those times set correctly.
@@ -444,7 +438,6 @@
times.actime = st.st_atime;
times.modtime = st.st_mtime;
utime (path, &times);
-#endif
}
else
{
@@ -773,9 +766,7 @@
/* save changes to disk */
static int sync_mailbox (CONTEXT *ctx, int *index_hint)
{
-#ifdef BUFFY_SIZE
BUFFY *tmp = NULL;
-#endif
int rc = -1;
if (!ctx->quiet)
@@ -786,9 +777,7 @@
case M_MBOX:
case M_MMDF:
rc = mbox_sync_mailbox (ctx, index_hint);
-#ifdef BUFFY_SIZE
tmp = mutt_find_mailbox (ctx->path);
-#endif
break;
case M_MH:
@@ -815,10 +804,8 @@
mutt_error ( _("Could not synchronize mailbox %s!"), ctx->path);
#endif
-#ifdef BUFFY_SIZE
if (tmp && tmp->new == 0)
mutt_update_mailbox (tmp);
-#endif
return rc;
}
--- mutt-1.5.14/init.h.checkmboxsize 2007-03-13 16:22:15.000000000 +0100
+++ mutt-1.5.14/init.h 2007-03-13 16:22:15.000000000 +0100
@@ -318,6 +318,12 @@
** follow these menus. The option is disabled by default because many
** visual terminals don't permit making the cursor invisible.
*/
+ { "check_mbox_size", DT_BOOL, R_NONE, OPTCHECKMBOXSIZE, 0 },
+ /*
+ ** .pp
+ ** When this variable is set, mutt will use file size attribute instead of
+ ** access time when checking for new mail.
+ */
{ "charset", DT_STR, R_NONE, UL &Charset, UL 0 },
/*
** .pp
--- mutt-1.5.14/buffy.h.checkmboxsize 2005-09-17 22:18:23.000000000 +0200
+++ mutt-1.5.14/buffy.h 2007-03-13 16:22:15.000000000 +0100
@@ -23,9 +23,7 @@
typedef struct buffy_t
{
char *path;
-#ifdef BUFFY_SIZE
long size;
-#endif /* BUFFY_SIZE */
struct buffy_t *next;
short new; /* mailbox has new mail */
short notified; /* user has been notified */
@@ -39,7 +37,5 @@
extern time_t BuffyDoneTime; /* last time we knew for sure how much mail there was */
-#ifdef BUFFY_SIZE
BUFFY *mutt_find_mailbox (const char *path);
void mutt_update_mailbox (BUFFY * b);
-#endif
--- mutt-1.5.14/mutt.h.checkmboxsize 2007-01-30 20:49:02.000000000 +0100
+++ mutt-1.5.14/mutt.h 2007-03-13 16:22:15.000000000 +0100
@@ -338,6 +338,7 @@
OPTBEEPNEW,
OPTBOUNCEDELIVERED,
OPTBRAILLEFRIENDLY,
+ OPTCHECKMBOXSIZE,
OPTCHECKNEW,
OPTCOLLAPSEUNREAD,
OPTCONFIRMAPPEND,
--- mutt-1.5.14/PATCHES.checkmboxsize 2007-03-13 16:22:32.000000000 +0100
+++ mutt-1.5.14/PATCHES 2007-03-13 16:23:01.000000000 +0100
@@ -0,0 +1 @@
+mutt-1.5.14-checkmboxsize.patch
--- mutt-1.5.14/main.c.checkmboxsize 2006-07-18 03:19:27.000000000 +0200
+++ mutt-1.5.14/main.c 2007-03-13 16:22:15.000000000 +0100
@@ -368,11 +368,6 @@
);
puts (
-#ifdef BUFFY_SIZE
- "+BUFFY_SIZE "
-#else
- "-BUFFY_SIZE "
-#endif
#ifdef EXACT_ADDRESS
"+EXACT_ADDRESS "
#else

44
mutt-1.5.16-manual.patch Normal file
View File

@ -0,0 +1,44 @@
--- mutt-1.5.16/doc/Makefile.in.manual 2007-06-10 04:43:25.000000000 +0200
+++ mutt-1.5.16/doc/Makefile.in 2007-06-11 13:08:17.000000000 +0200
@@ -481,10 +481,9 @@ muttrc.man: ../makedoc$(EXEEXT) $(top_sr
mutt.1: $(srcdir)/mutt.man
$(EDIT) $(srcdir)/mutt.man > $@
-stamp-doc-xml: $(top_srcdir)/makedoc.c $(top_srcdir)/makedoc-defs.h $(top_srcdir)/init.h \
+stamp-doc-xml: ../makedoc$(EXEEXT) $(top_srcdir)/makedoc-defs.h $(top_srcdir)/init.h \
manual.xml.head $(top_srcdir)/functions.h $(top_srcdir)/OPS* manual.xml.tail \
$(srcdir)/gen-map-doc $(top_srcdir)/VERSION $(top_srcdir)/ChangeLog
- $(MAKE) ../makedoc$(EXEEXT) # we do not want to rebuild the documentation in tarball builds
( date=`head -n 1 $(top_srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 1` && \
sed -e "s/@VERSION\@/`cat $(top_srcdir)/VERSION` ($$date)/" $(srcdir)/manual.xml.head && \
$(MAKEDOC_CPP) $(top_srcdir)/init.h | ../makedoc -s && \
--- mutt-1.5.16/doc/manual.xml.head.manual 2007-04-04 07:37:13.000000000 +0200
+++ mutt-1.5.16/doc/manual.xml.head 2007-06-11 13:05:41.000000000 +0200
@@ -5045,7 +5045,7 @@ changed with the <literal>edit-descripti
<para>
When you add an attachment to your mail message, Mutt searches your
personal mime.types file at <literal>&dollar;&lcub;HOME&rcub;/.mime.types</literal>, and then
-the system mime.types file at <literal>/usr/local/share/mutt/mime.types</literal> or
+the system mime.types file at <literal>/usr/share/mutt/mime.types</literal> or
<literal>/etc/mime.types</literal>
</para>
@@ -5102,7 +5102,7 @@ find an external handler. The default s
is a colon delimited list set to
<screen>
-${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
+${HOME}/.mailcap:/usr/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
</screen>
where <literal>&dollar;HOME</literal> is your home directory.
--- mutt-1.5.16/init.h.manual 2007-06-10 04:29:21.000000000 +0200
+++ mutt-1.5.16/init.h 2007-06-11 13:05:41.000000000 +0200
@@ -19,7 +19,6 @@
#ifdef _MAKEDOC
# include "config.h"
-# include "makedoc-defs.h"
#else
# include "sort.h"
#endif

View File

@ -1,6 +1,6 @@
--- mutt-1.5.14/Muttrc.head.in.muttrc 2006-07-23 00:55:57.000000000 +0200
+++ mutt-1.5.14/Muttrc.head.in 2007-03-19 10:57:41.000000000 +0100
@@ -16,11 +16,15 @@
--- mutt-1.5.16/Muttrc.head.muttrc 2007-06-06 18:02:56.000000000 +0200
+++ mutt-1.5.16/Muttrc.head 2007-06-11 10:46:02.000000000 +0200
@@ -19,11 +19,15 @@
# Show documentation when pressing F1
macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"

View File

@ -1,91 +0,0 @@
# HG changeset patch
# User Brendan Cully <brendan@kublai.com>
# Date 1175552458 25200
# Node ID 4adb236ca78d25cd6eb4805da033a0951b62b0dd
# Parent e363d7a6904653f2b5acc17f6ea0da526bb63711
Validate msgid in APOP authentication. Closes #2846
diff -r e363d7a69046 -r 4adb236ca78d pop_auth.c
--- a/pop_auth.c Tue Apr 03 08:59:11 2007 -0700
+++ b/pop_auth.c Mon Apr 02 15:20:58 2007 -0700
@@ -183,6 +183,13 @@ static pop_auth_res_t pop_auth_apop (POP
if (!pop_data->timestamp)
return POP_A_UNAVAIL;
+ if (rfc822_valid_msgid (pop_data->timestamp) < 0)
+ {
+ mutt_error _("POP timestamp is invalid!");
+ mutt_sleep (2);
+ return POP_A_UNAVAIL;
+ }
+
mutt_message _("Authenticating (APOP)...");
/* Compute the authentication hash to send to the server */
diff -r e363d7a69046 -r 4adb236ca78d rfc822.c
--- a/rfc822.c Tue Apr 03 08:59:11 2007 -0700
+++ b/rfc822.c Mon Apr 02 15:20:58 2007 -0700
@@ -792,6 +792,52 @@ ADDRESS *rfc822_append (ADDRESS **a, ADD
return tmp;
}
+/* incomplete. Only used to thwart the APOP MD5 attack (#2846). */
+int rfc822_valid_msgid (const char *msgid)
+{
+ /* msg-id = "<" addr-spec ">"
+ * addr-spec = local-part "@" domain
+ * local-part = word *("." word)
+ * word = atom / quoted-string
+ * atom = 1*<any CHAR except specials, SPACE and CTLs>
+ * CHAR = ( 0.-127. )
+ * specials = "(" / ")" / "<" / ">" / "@"
+ / "," / ";" / ":" / "\" / <">
+ / "." / "[" / "]"
+ * SPACE = ( 32. )
+ * CTLS = ( 0.-31., 127.)
+ * quoted-string = <"> *(qtext/quoted-pair) <">
+ * qtext = <any CHAR except <">, "\" and CR>
+ * CR = ( 13. )
+ * quoted-pair = "\" CHAR
+ * domain = sub-domain *("." sub-domain)
+ * sub-domain = domain-ref / domain-literal
+ * domain-ref = atom
+ * domain-literal = "[" *(dtext / quoted-pair) "]"
+ */
+
+ char* dom;
+ unsigned int l, i;
+
+ if (!msgid || !*msgid)
+ return -1;
+
+ l = mutt_strlen (msgid);
+ if (l < 5) /* <atom@atom> */
+ return -1;
+ if (msgid[0] != '<' || msgid[l-1] != '>')
+ return -1;
+ if (!(dom = strrchr (msgid, '@')))
+ return -1;
+
+ /* TODO: complete parser */
+ for (i = 0; i < l; i++)
+ if ((unsigned char)msgid[i] > 127)
+ return -1;
+
+ return 0;
+}
+
#ifdef TESTING
int safe_free (void **p) /* __SAFE_FREE_CHECKED__ */
{
diff -r e363d7a69046 -r 4adb236ca78d rfc822.h
--- a/rfc822.h Tue Apr 03 08:59:11 2007 -0700
+++ b/rfc822.h Mon Apr 02 15:20:58 2007 -0700
@@ -52,6 +52,7 @@ void rfc822_write_address_single (char *
void rfc822_write_address_single (char *, size_t, ADDRESS *, int);
void rfc822_free_address (ADDRESS **addr);
void rfc822_cat (char *, size_t, const char *, const char *);
+int rfc822_valid_msgid (const char *msgid);
extern int RFC822Error;
extern const char *RFC822Errors[];

View File

@ -1,20 +0,0 @@
# HG changeset patch
# User Brendan Cully <brendan@kublai.com>
# Date 1178561955 25200
# Node ID 47d08903b79b78ce26516de97682b244d3573c47
# Parent f6861b85f22b1656a870aeabad83a1bbd9794af9
Use signed arithmetic in mutt_gecos_name to avoid an overflow.
Closes #2885.
diff -r f6861b85f22b -r 47d08903b79b muttlib.c
--- a/muttlib.c Wed May 02 10:50:07 2007 -0700
+++ b/muttlib.c Mon May 07 11:19:15 2007 -0700
@@ -540,7 +540,7 @@ char *mutt_gecos_name (char *dest, size_
if (dest[idx] == '&')
{
memmove (&dest[idx + pwnl], &dest[idx + 1],
- MAX(destlen - idx - pwnl - 1, 0));
+ MAX((ssize_t)(destlen - idx - pwnl - 1), 0));
memcpy (&dest[idx], pw->pw_name, MIN(destlen - idx - 1, pwnl));
dest[idx] = toupper ((unsigned char) dest[idx]);
}

View File

@ -1,7 +1,7 @@
Summary: A text mode mail user agent
Name: mutt
Version: 1.5.14
Release: 4%{?dist}
Version: 1.5.16
Release: 1%{?dist}
Epoch: 5
License: GPL
Group: Applications/Internet
@ -10,13 +10,10 @@ Source: ftp://ftp.mutt.org/pub/mutt/devel/mutt-%{version}.tar.gz
Source2: ftp://ftp.mutt.org/pub/mutt/contrib/urlview-%{uversion}.tar.gz
Source1: mutt_ldap_query
Patch2: mutt-1.5.13-nodotlock.patch
Patch3: mutt-1.5.14-muttrc.patch
Patch4: mutt-1.5.13-manual.patch
Patch3: mutt-1.5.16-muttrc.patch
Patch4: mutt-1.5.16-manual.patch
Patch5: urlview-0.9-default.patch
Patch6: urlview.diff
Patch7: mutt-1.5.14-checkmboxsize.patch
Patch8: mutt-apopmsgid.patch
Patch9: mutt-gecos.patch
Url: http://www.mutt.org/
Requires: /usr/sbin/sendmail webclient mailcap
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -40,15 +37,13 @@ you are going to use.
%patch4 -p1 -b .manual
%patch5 -p0 -b .default
%patch6 -p0 -b .build
%patch7 -p1 -b .checkmboxsize
%patch8 -p1 -b .apopmsgid
%patch9 -p1 -b .gecos
install -p -m644 %{SOURCE1} mutt_ldap_query
%build
%configure \
--enable-pop --enable-imap \
--enable-smtp \
--with-gnutls \
--with-gss \
--with-sasl \
@ -85,7 +80,7 @@ echo "# Local configuration for Mutt." > $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.lo
cd urlview-%{uversion}
install urlview url_handler.sh $RPM_BUILD_ROOT%{_bindir}
install -m 644 urlview.man $RPM_BUILD_ROOT%{_mandir}/man1/urlview.1
install -p -m 644 urlview.man $RPM_BUILD_ROOT%{_mandir}/man1/urlview.1
mkdir -p doc/urlview
cp -p AUTHORS ChangeLog COPYING README sample.urlview \
doc/urlview
@ -121,6 +116,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man5/muttrc.*
%changelog
* Mon Jun 11 2007 Miroslav Lichvar <mlichvar@redhat.com> 5:1.5.16-1
- update to 1.5.16
* Mon May 28 2007 Miroslav Lichvar <mlichvar@redhat.com> 5:1.5.14-4
- validate msgid in APOP authentication (CVE-2007-1558)
- fix overflow in gecos field handling (CVE-2007-2683)

View File

@ -1,2 +1,2 @@
67731f73e69297ffd106b65c8aebb2ab urlview-0.9.tar.gz
6d33b4f0074e39772021d947c49b30c6 mutt-1.5.14.tar.gz
10eff7024dbb7ce1f773d688a69ea9db mutt-1.5.16.tar.gz