Accepting request 621178 from server:mail
- Skip neomutt now (boo#1094717) * There exists a package neomutt * mutt-1.10.0 uses a lot of extensions now like compessed folders and header caching, but still misses things like notmuch - Modified patches * aw.listreply.diff * bsc907453-CVE-2014-9116-jessie.patch * bug-676388-largefile.patch * mutt-1.5.15-wrapcolumn.diff * mutt-1.5.20-sendgroupreplyto.diff * mutt-1.5.21-mailcap.diff * mutt-1.5.23-carriage-return.path * mutt-1.5.9i-pgpewrap.diff * mutt-1.6.1-opennfs.dif * patch-1.5.24.vk.pgp_verbose_mime * widechar.sidebar.dif - Renamed patch: mutt-1.9.1.dif becomes mutt-1.10.0.dif - Deleted patches mutt-1.9.0-1.9.1.patch neomutt-c030a8b.patch - Add patch truncate.patch to avoid truncated buffers due snprintf OBS-URL: https://build.opensuse.org/request/show/621178 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mutt?expand=0&rev=81
This commit is contained in:
commit
e34ccd2726
@ -7,42 +7,42 @@ ask when sending list message replies to author only - Armin Wolfermann (aw)
|
|||||||
3 files changed, 26 insertions(+)
|
3 files changed, 26 insertions(+)
|
||||||
|
|
||||||
--- init.h
|
--- init.h
|
||||||
+++ init.h 2017-09-11 11:57:46.199273705 +0000
|
+++ init.h 2018-07-04 13:25:19.570925951 +0000
|
||||||
@@ -1662,6 +1662,13 @@ struct Option MuttVars[] = {
|
@@ -1518,6 +1518,13 @@ struct option_t MuttVars[] = {
|
||||||
** ``$$keywords_standard'' are \fCfalse\fP, mutt will save keywords
|
** from your spool mailbox to your $$mbox mailbox, or as a result of
|
||||||
** to legacy headers to ensure that it does not lose your labels.
|
** a ``$mbox-hook'' command.
|
||||||
*/
|
*/
|
||||||
+ { "list_reply", DT_QUAD, R_NONE, OPT_LIST_REPLY, MUTT_NO },
|
+ { "list_reply", DT_QUAD, R_NONE, OPT_LISTREPLY, MUTT_NO },
|
||||||
+ /*
|
+ /*
|
||||||
+ ** .pp
|
+ ** .pp
|
||||||
+ ** When set, address replies to the mailing list the original message came
|
+ ** 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
|
+ ** 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.
|
+ ** ``ask-no'' will ask if you really intended to reply to the author only.
|
||||||
+ */
|
+ */
|
||||||
{ "mail_check", DT_NUMBER, R_NONE, UL &MailCheck, 5 },
|
{ "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 },
|
||||||
/*
|
/*
|
||||||
** .pp
|
** .pp
|
||||||
--- mutt.h
|
--- mutt.h
|
||||||
+++ mutt.h 2017-09-11 11:59:08.957770801 +0000
|
+++ mutt.h 2018-07-04 13:24:58.147315807 +0000
|
||||||
@@ -266,6 +266,7 @@ enum QuadOptionVars
|
@@ -311,6 +311,7 @@ enum
|
||||||
#endif
|
#endif
|
||||||
OPT_ABORT_NOSUBJECT,
|
OPT_SUBJECT,
|
||||||
OPT_CRYPT_VERIFY_SIG, /* verify PGP signatures */
|
OPT_VERIFYSIG, /* verify PGP signatures */
|
||||||
+ OPT_LIST_REPLY,
|
+ OPT_LISTREPLY,
|
||||||
#ifdef USE_NNTP
|
|
||||||
OPT_POST_MODERATED,
|
/* THIS MUST BE THE LAST VALUE. */
|
||||||
OPT_CATCHUP_NEWSGROUP,
|
OPT_MAX
|
||||||
--- send.c
|
--- send.c
|
||||||
+++ send.c 2017-09-11 12:00:28.680322715 +0000
|
+++ send.c 2018-07-04 13:28:46.211165353 +0000
|
||||||
@@ -532,6 +532,7 @@ static int include_reply(struct Context
|
@@ -448,6 +448,7 @@ static int include_reply (CONTEXT *ctx,
|
||||||
static int default_to(struct Address **to, struct Envelope *env, int flags, int hmfupto)
|
static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto)
|
||||||
{
|
{
|
||||||
char prompt[STRING];
|
char prompt[STRING];
|
||||||
+ struct Address *tmp;
|
+ struct Address *tmp;
|
||||||
|
|
||||||
if (flags && env->mail_followup_to && hmfupto == MUTT_YES)
|
if (flags && env->mail_followup_to && hmfupto == MUTT_YES)
|
||||||
{
|
{
|
||||||
@@ -545,6 +546,23 @@ static int default_to(struct Address **t
|
@@ -461,6 +462,23 @@ static int default_to (ADDRESS **to, ENV
|
||||||
if (flags & SENDLISTREPLY)
|
if (flags & SENDLISTREPLY)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ ask when sending list message replies to author only - Armin Wolfermann (aw)
|
|||||||
+ * intended to reply to the author only.
|
+ * intended to reply to the author only.
|
||||||
+ */
|
+ */
|
||||||
+ if (!(flags & SENDGROUPREPLY) && mutt_is_list_cc (0, env->to, env->cc)) {
|
+ if (!(flags & SENDGROUPREPLY) && mutt_is_list_cc (0, env->to, env->cc)) {
|
||||||
+ switch (query_quadoption (OPT_LIST_REPLY,
|
+ switch (query_quadoption (OPT_LISTREPLY,
|
||||||
+ _("Message came from a mailing list. Reply to author only?")))
|
+ _("Message came from a mailing list. Reply to author only?")))
|
||||||
+ {
|
+ {
|
||||||
+ case MUTT_NO:
|
+ case MUTT_NO:
|
||||||
@ -63,6 +63,6 @@ ask when sending list message replies to author only - Armin Wolfermann (aw)
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if (!option(OPT_REPLY_SELF) && mutt_addr_is_user(env->from))
|
if (!option(OPTREPLYSELF) && mutt_addr_is_user (env->from))
|
||||||
{
|
{
|
||||||
/* mail is from the user, assume replying to recipients */
|
/* mail is from the user, assume replying to recipients */
|
||||||
|
@ -13,14 +13,14 @@ has -jessie prefixed in its name.
|
|||||||
Index: mutt/lib.c
|
Index: mutt/lib.c
|
||||||
===================================================================
|
===================================================================
|
||||||
---
|
---
|
||||||
lib/string.c | 3 +++
|
lib.c | 3 +++
|
||||||
1 file changed, 3 insertions(+)
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
--- lib/string.c
|
--- lib.c
|
||||||
+++ lib/string.c 2017-09-11 12:20:02.770906853 +0000
|
+++ lib.c 2018-07-05 08:26:51.564728125 +0000
|
||||||
@@ -338,6 +338,9 @@ char *mutt_substrdup(const char *begin,
|
@@ -819,6 +819,9 @@ char *mutt_substrdup (const char *begin,
|
||||||
size_t len;
|
size_t len;
|
||||||
char *p = NULL;
|
char *p;
|
||||||
|
|
||||||
+ if (end != NULL && end < begin)
|
+ if (end != NULL && end < begin)
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
|
@ -1,23 +1,11 @@
|
|||||||
---
|
---
|
||||||
body.h | 2 +-
|
|
||||||
mh.c | 6 +++---
|
mh.c | 6 +++---
|
||||||
ncrypt/crypt_gpgme.c | 2 +-
|
mutt.h | 2 +-
|
||||||
3 files changed, 5 insertions(+), 5 deletions(-)
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- body.h
|
|
||||||
+++ body.h 2017-09-11 11:52:02.449585688 +0000
|
|
||||||
@@ -37,7 +37,7 @@ struct Body
|
|
||||||
struct 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 */
|
|
||||||
--- mh.c
|
--- mh.c
|
||||||
+++ mh.c 2017-09-11 11:50:58.466761763 +0000
|
+++ mh.c 2018-07-04 12:55:15.079790270 +0000
|
||||||
@@ -1757,9 +1757,9 @@ static int mh_rewrite_message(struct Con
|
@@ -1735,9 +1735,9 @@ static int mh_rewrite_message (CONTEXT *
|
||||||
char newpath[_POSIX_PATH_MAX];
|
char newpath[_POSIX_PATH_MAX];
|
||||||
char partpath[_POSIX_PATH_MAX];
|
char partpath[_POSIX_PATH_MAX];
|
||||||
|
|
||||||
@ -28,16 +16,16 @@
|
|||||||
+ LOFF_T old_body_length = h->content->length;
|
+ LOFF_T old_body_length = h->content->length;
|
||||||
+ LOFF_T old_hdr_lines = h->lines;
|
+ LOFF_T old_hdr_lines = h->lines;
|
||||||
|
|
||||||
if ((dest = mx_open_new_message(ctx, h, 0)) == NULL)
|
if ((dest = mx_open_new_message (ctx, h, 0)) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
--- ncrypt/crypt_gpgme.c
|
--- mutt.h
|
||||||
+++ ncrypt/crypt_gpgme.c 2017-09-11 11:52:34.888989382 +0000
|
+++ mutt.h 2018-07-04 12:54:40.604418656 +0000
|
||||||
@@ -570,7 +570,7 @@ static gpgme_data_t body_to_data_object(
|
@@ -689,7 +689,7 @@ typedef struct body
|
||||||
* Create a GPGME data object from the stream FP but limit the object
|
PARAMETER *parameter; /* parameters of the content-type */
|
||||||
* to LENGTH bytes starting at OFFSET bytes from the beginning of the file.
|
char *description; /* content-description */
|
||||||
*/
|
char *form_name; /* Content-Disposition form-data name param */
|
||||||
-static gpgme_data_t file_to_data_object(FILE *fp, long offset, long length)
|
- long hdr_offset; /* offset in stream where the headers begin.
|
||||||
+static gpgme_data_t file_to_data_object(FILE *fp, LOFF_T offset, long length)
|
+ LOFF_T hdr_offset; /* offset in stream where the headers begin.
|
||||||
{
|
* this info is used when invoking metamail,
|
||||||
int err = 0;
|
* where we need to send the headers of the
|
||||||
gpgme_data_t data;
|
* attachment
|
||||||
|
109
mutt-1.10.0.dif
Normal file
109
mutt-1.10.0.dif
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
---
|
||||||
|
configure.ac | 18 +++++++++++++-----
|
||||||
|
doc/Muttrc.head | 2 +-
|
||||||
|
imap/auth.c | 22 ++++++++++++++++++++++
|
||||||
|
mx.c | 3 +++
|
||||||
|
4 files changed, 39 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac 2018-07-04 11:58:54.469266378 +0000
|
||||||
|
@@ -257,7 +257,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 && $withval != /usr ; then
|
||||||
|
CPPFLAGS="$CPPFLAGS -I${withval}/include"
|
||||||
|
fi
|
||||||
|
LDFLAGS="$LDFLAGS -L${withval}/lib"
|
||||||
|
@@ -700,8 +700,12 @@ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-
|
||||||
|
else
|
||||||
|
if test "$with_ssl" != "yes"
|
||||||
|
then
|
||||||
|
- LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||||
|
- CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||||
|
+ case $withval in /usr|/usr/local) ;;
|
||||||
|
+ *)
|
||||||
|
+ LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||||
|
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
fi
|
||||||
|
saved_LIBS="$LIBS"
|
||||||
|
|
||||||
|
@@ -788,8 +792,12 @@ AC_ARG_WITH(sasl, AS_HELP_STRING([--with
|
||||||
|
|
||||||
|
if test "$with_sasl" != "yes"
|
||||||
|
then
|
||||||
|
- CPPFLAGS="$CPPFLAGS -I$with_sasl/include"
|
||||||
|
- LDFLAGS="$LDFLAGS -L$with_sasl/lib"
|
||||||
|
+ 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/Muttrc.head
|
||||||
|
+++ doc/Muttrc.head 2018-07-04 11:53:27.427203358 +0000
|
||||||
|
@@ -23,7 +23,7 @@ macro index,pager,attach,compose \cb "\
|
||||||
|
"call urlview to extract URLs out of a message"
|
||||||
|
|
||||||
|
# Show documentation when pressing F1
|
||||||
|
-macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
|
||||||
|
+macro generic,index,pager <F1> "<shell-escape> less @docdir@/manual.txt.gz<Enter>" "show Mutt documentation"
|
||||||
|
|
||||||
|
# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
|
||||||
|
macro index y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
|
||||||
|
--- imap/auth.c
|
||||||
|
+++ imap/auth.c 2018-07-04 11:52:06.288675786 +0000
|
||||||
|
@@ -72,6 +72,25 @@ 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)
|
||||||
|
+ {
|
||||||
|
+ const 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 +104,9 @@ int imap_authenticate (IMAP_DATA* idata)
|
||||||
|
|
||||||
|
authenticator++;
|
||||||
|
}
|
||||||
|
+#ifdef USE_SASL
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
FREE (&methods);
|
||||||
|
--- mx.c
|
||||||
|
+++ mx.c 2018-07-04 11:24:07.179272240 +0000
|
||||||
|
@@ -1400,6 +1400,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! */
|
3
mutt-1.10.0.tar.gz
Normal file
3
mutt-1.10.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0215b5f90ef9cc33441a6ca842379b64412ed7f8da83ed68bfaa319179f5535b
|
||||||
|
size 4249980
|
@ -5,12 +5,12 @@ Index: init.h
|
|||||||
1 file changed, 1 insertion(+)
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
--- init.h
|
--- init.h
|
||||||
+++ init.h 2017-09-11 11:39:38.727250536 +0000
|
+++ init.h 2018-07-04 12:19:10.323191976 +0000
|
||||||
@@ -4354,6 +4354,7 @@ struct Option MuttVars[] = {
|
@@ -3954,6 +3954,7 @@ struct option_t MuttVars[] = {
|
||||||
** printing, or replying to messages.
|
** printing, or replying to messages.
|
||||||
*/
|
*/
|
||||||
{ "wrap", DT_NUMBER, R_PAGER, UL &Wrap, 0 },
|
{ "wrap", DT_NUM, R_PAGER, UL &Wrap, 0 },
|
||||||
+ { "wrapcolumn", DT_SYNONYM, R_NONE, UL "wrap", 0 },
|
+ { "wrapcolumn", DT_SYN, R_NONE, UL "wrap", 0 },
|
||||||
/*
|
/*
|
||||||
** .pp
|
** .pp
|
||||||
** When set to a positive value, mutt will wrap text at $$wrap characters.
|
** When set to a positive value, mutt will wrap text at $$wrap characters.
|
||||||
|
@ -1,44 +1,44 @@
|
|||||||
---
|
---
|
||||||
init.h | 7 +++++++
|
init.h | 7 +++++++
|
||||||
options.h | 1 +
|
mutt.h | 1 +
|
||||||
send.c | 12 ++++++++++--
|
send.c | 12 ++++++++++--
|
||||||
3 files changed, 18 insertions(+), 2 deletions(-)
|
3 files changed, 18 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
--- init.h
|
--- init.h
|
||||||
+++ init.h 2017-09-11 11:36:34.666630359 +0000
|
+++ init.h 2018-07-04 12:14:37.508148148 +0000
|
||||||
@@ -3135,6 +3135,13 @@ struct Option MuttVars[] = {
|
@@ -2792,6 +2792,13 @@ struct option_t MuttVars[] = {
|
||||||
** .pp
|
** .pp
|
||||||
** Also see the $$force_name variable.
|
** Also see the $$force_name variable.
|
||||||
*/
|
*/
|
||||||
+ { "send_group_reply_to", DT_BOOL, R_NONE, OPT_SENDGROUP_REPLYTO, 0 },
|
+ { "send_group_reply_to", DT_BOOL, R_NONE, OPTSENDGROUPREPLYTO, 0 },
|
||||||
+ /*
|
+ /*
|
||||||
+ ** .pp
|
+ ** .pp
|
||||||
+ ** This variable controls how group replies are done.
|
+ ** This variable controls how group replies are done.
|
||||||
+ ** When set, all recepients listet in "To:" are set in the
|
+ ** When set, all recepients listet in "To:" are set in the
|
||||||
+ ** "To:" header again, else in the "CC", which is the default.
|
+ ** "To:" header again, else in the "CC", which is the default.
|
||||||
+ */
|
+ */
|
||||||
{ "score", DT_BOOL, R_NONE, OPT_SCORE, 1 },
|
{ "score", DT_BOOL, R_NONE, OPTSCORE, 1 },
|
||||||
/*
|
/*
|
||||||
** .pp
|
** .pp
|
||||||
--- options.h
|
--- mutt.h
|
||||||
+++ options.h 2017-09-11 11:37:05.418065746 +0000
|
+++ mutt.h 2018-07-04 12:14:07.560692103 +0000
|
||||||
@@ -160,6 +160,7 @@ enum GlobalBool
|
@@ -468,6 +468,7 @@ enum
|
||||||
OPT_SAVE_ADDRESS,
|
OPTSAVEADDRESS,
|
||||||
OPT_SAVE_EMPTY,
|
OPTSAVEEMPTY,
|
||||||
OPT_SAVE_NAME,
|
OPTSAVENAME,
|
||||||
+ OPT_SENDGROUP_REPLYTO,
|
+ OPTSENDGROUPREPLYTO,
|
||||||
OPT_SCORE,
|
OPTSCORE,
|
||||||
#ifdef USE_SIDEBAR
|
#ifdef USE_SIDEBAR
|
||||||
OPT_SIDEBAR_VISIBLE,
|
OPTSIDEBAR,
|
||||||
--- send.c
|
--- send.c
|
||||||
+++ send.c 2017-09-11 11:37:26.009687657 +0000
|
+++ send.c 2018-07-04 12:15:43.734945139 +0000
|
||||||
@@ -637,8 +637,16 @@ int mutt_fetch_recips(struct Envelope *o
|
@@ -557,8 +557,16 @@ int mutt_fetch_recips (ENVELOPE *out, EN
|
||||||
if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != MUTT_YES))
|
if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != MUTT_YES))
|
||||||
{
|
{
|
||||||
/* if(!mutt_addr_is_user(in->to)) */
|
/* if(!mutt_addr_is_user(in->to)) */
|
||||||
- rfc822_append(&out->cc, in->to, 1);
|
- rfc822_append (&out->cc, in->to, 1);
|
||||||
- rfc822_append(&out->cc, in->cc, 1);
|
- rfc822_append (&out->cc, in->cc, 1);
|
||||||
+ if (option (OPT_SENDGROUP_REPLYTO))
|
+ if (option (OPTSENDGROUPREPLYTO))
|
||||||
+ {
|
+ {
|
||||||
+ rfc822_append(&out->to, in->to, 0);
|
+ rfc822_append(&out->to, in->to, 0);
|
||||||
+ rfc822_append(&out->cc, in->cc, 1);
|
+ rfc822_append(&out->cc, in->cc, 1);
|
||||||
|
@ -4,18 +4,17 @@ text/html
|
|||||||
Index: mutt-1.5.21/init.c
|
Index: mutt-1.5.21/init.c
|
||||||
===================================================================
|
===================================================================
|
||||||
---
|
---
|
||||||
init.c | 3 ++-
|
init.c | 2 +-
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
--- init.c
|
--- init.c
|
||||||
+++ init.c 2017-09-11 12:17:15.337988648 +0000
|
+++ init.c 2018-07-05 08:23:55.663914846 +0000
|
||||||
@@ -4248,7 +4248,8 @@ void mutt_init(int skip_sys_rc, struct L
|
@@ -3464,7 +3464,7 @@ void mutt_init (int skip_sys_rc, LIST *c
|
||||||
|
else
|
||||||
|
{
|
||||||
/* Default search path from RFC1524 */
|
/* Default search path from RFC1524 */
|
||||||
MailcapPath = safe_strdup(
|
- MailcapPath = safe_strdup ("~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
|
||||||
"~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR
|
+ MailcapPath = safe_strdup ("~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap:" SYSCONFDIR "/mutt/mailcap");
|
||||||
- "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
|
|
||||||
+ "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap"
|
|
||||||
+ SYSCONFDIR "/mutt/mailcap");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Tmpdir = safe_strdup((p = getenv("TMPDIR")) ? p : "/tmp");
|
Tempdir = safe_strdup ((p = getenv ("TMPDIR")) ? p : "/tmp");
|
||||||
|
@ -1,130 +1,130 @@
|
|||||||
---
|
---
|
||||||
lib/string.c | 12 ++++++++++++
|
crypt-gpgme.c | 2 +-
|
||||||
lib/string2.h | 1 +
|
lib.c | 11 +++++++++++
|
||||||
ncrypt/crypt_gpgme.c | 2 +-
|
lib.h | 1 +
|
||||||
ncrypt/pgp.c | 24 ++++++++++++------------
|
|
||||||
pager.c | 2 +-
|
pager.c | 2 +-
|
||||||
5 files changed, 27 insertions(+), 14 deletions(-)
|
pgp.c | 24 ++++++++++++------------
|
||||||
|
5 files changed, 26 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
--- lib/string.c
|
--- crypt-gpgme.c
|
||||||
+++ lib/string.c 2017-09-11 12:12:00.503744275 +0000
|
+++ crypt-gpgme.c 2018-07-05 08:04:39.576930067 +0000
|
||||||
@@ -362,6 +362,18 @@ int mutt_strcmp(const char *a, const cha
|
@@ -2331,7 +2331,7 @@ static void copy_clearsigned (gpgme_data
|
||||||
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);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/**
|
|
||||||
* mutt_strcasecmp - Compare two strings ignoring case, safely
|
|
||||||
* @param a First string to compare
|
|
||||||
--- lib/string2.h
|
|
||||||
+++ lib/string2.h 2017-09-11 12:14:01.681538993 +0000
|
|
||||||
@@ -67,6 +67,7 @@ void mutt_str_adjust(char **p);
|
|
||||||
int mutt_strcasecmp(const char *a, const char *b);
|
|
||||||
const char *mutt_strchrnul(const char *s, char c);
|
|
||||||
int mutt_strcmp(const char *a, const char *b);
|
|
||||||
+int mutt_strxcmp(const char *a, const char *b);
|
|
||||||
int mutt_strcoll(const char *a, const char *b);
|
|
||||||
const char *mutt_stristr(const char *haystack, const char *needle);
|
|
||||||
size_t mutt_strlen(const char *a);
|
|
||||||
--- ncrypt/crypt_gpgme.c
|
|
||||||
+++ ncrypt/crypt_gpgme.c 2017-09-11 12:09:17.086717319 +0000
|
|
||||||
@@ -2442,7 +2442,7 @@ static void copy_clearsigned(gpgme_data_
|
|
||||||
|
|
||||||
if (armor_header)
|
if (armor_header)
|
||||||
{
|
{
|
||||||
- if (buf[0] == '\n')
|
- if (buf[0] == '\n')
|
||||||
+ if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
|
+ if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
|
||||||
armor_header = false;
|
armor_header = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
--- ncrypt/pgp.c
|
--- lib.c
|
||||||
+++ ncrypt/pgp.c 2017-09-11 12:08:10.179934232 +0000
|
+++ lib.c 2018-07-05 08:14:39.346030258 +0000
|
||||||
@@ -301,7 +301,7 @@ static void pgp_copy_clearsigned(FILE *f
|
@@ -875,6 +875,17 @@ int mutt_strcmp(const char *a, const cha
|
||||||
continue;
|
return strcmp(NONULL(a), NONULL(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (mutt_strcmp(buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
|
+int mutt_strxcmp(const char *a, const char *b)
|
||||||
+ if (mutt_strxcmp(buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
|
+{
|
||||||
break;
|
+ const size_t xa = strcspn(NONULL(a), "\r\n");
|
||||||
|
+ const size_t xb = strcspn(NONULL(b), "\r\n");
|
||||||
if (armor_header)
|
+ if (xb != xa)
|
||||||
@@ -369,14 +369,14 @@ int pgp_application_pgp_handler(struct B
|
+ return -1;
|
||||||
|
+ if (!xa)
|
||||||
|
+ return 0;
|
||||||
|
+ return strncmp(NONULL(a), NONULL(b), (size_t)xa);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
int mutt_strcasecmp(const char *a, const char *b)
|
||||||
{
|
{
|
||||||
clearsign = false;
|
return strcasecmp(NONULL(a), NONULL(b));
|
||||||
|
--- lib.h
|
||||||
- if (mutt_strcmp("MESSAGE-----\n", buf + 15) == 0)
|
+++ lib.h 2018-07-05 07:54:51.679598142 +0000
|
||||||
+ if (mutt_strxcmp("MESSAGE-----\n", buf + 15) == 0)
|
@@ -203,6 +203,7 @@ int mutt_copy_bytes (FILE *, FILE *, siz
|
||||||
needpass = 1;
|
int mutt_rx_sanitize_string (char *, size_t, const char *);
|
||||||
- else if (mutt_strcmp("SIGNED MESSAGE-----\n", buf + 15) == 0)
|
int mutt_strcasecmp (const char *, const char *);
|
||||||
+ else if (mutt_strxcmp("SIGNED MESSAGE-----\n", buf + 15) == 0)
|
int mutt_strcmp (const char *, const char *);
|
||||||
{
|
+int mutt_strxcmp(const char *a, const char *b);
|
||||||
clearsign = true;
|
int mutt_strncasecmp (const char *, const char *, size_t);
|
||||||
needpass = 0;
|
int mutt_strncmp (const char *, const char *, size_t);
|
||||||
}
|
int mutt_strcoll (const char *, const char *);
|
||||||
- else if (mutt_strcmp("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
|
|
||||||
+ else if (mutt_strxcmp("PUBLIC KEY BLOCK-----\n", buf + 15) == 0)
|
|
||||||
{
|
|
||||||
needpass = 0;
|
|
||||||
pgp_keyblock = true;
|
|
||||||
@@ -410,9 +410,9 @@ int pgp_application_pgp_handler(struct B
|
|
||||||
|
|
||||||
fputs(buf, tmpfp);
|
|
||||||
|
|
||||||
- if ((needpass && (mutt_strcmp("-----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))))
|
|
||||||
+ if ((needpass && (mutt_strxcmp("-----END PGP MESSAGE-----\n", buf) == 0)) ||
|
|
||||||
+ (!needpass && ((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)
|
|
||||||
@@ -650,11 +650,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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1144,9 +1144,9 @@ struct Body *pgp_sign_message(struct Bod
|
|
||||||
*/
|
|
||||||
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);
|
|
||||||
--- pager.c
|
--- pager.c
|
||||||
+++ pager.c 2017-09-11 12:10:06.737814133 +0000
|
+++ pager.c 2018-07-05 08:08:31.328720187 +0000
|
||||||
@@ -827,7 +827,7 @@ static void resolve_types(char *buf, cha
|
@@ -785,7 +785,7 @@ resolve_types (char *buf, char *raw, str
|
||||||
line_info[n].type = MT_COLOR_NORMAL;
|
else if (check_attachment_marker ((char *) raw) == 0)
|
||||||
else if (check_attachment_marker((char *) raw) == 0)
|
lineInfo[n].type = MT_COLOR_ATTACHMENT;
|
||||||
line_info[n].type = MT_COLOR_ATTACHMENT;
|
#endif
|
||||||
- else if ((mutt_strcmp("-- \n", buf) == 0) || (mutt_strcmp("-- \r\n", buf) == 0))
|
- else if (mutt_strcmp ("-- \n", buf) == 0 || mutt_strcmp ("-- \r\n", buf) == 0)
|
||||||
+ else if (mutt_strxcmp("-- \n", buf) == 0)
|
+ else if (mutt_strxcmp ("-- \n", buf) == 0)
|
||||||
{
|
{
|
||||||
i = n + 1;
|
i = n + 1;
|
||||||
|
|
||||||
|
--- pgp.c
|
||||||
|
+++ pgp.c 2018-07-05 08:07:03.658313041 +0000
|
||||||
|
@@ -305,7 +305,7 @@ static void pgp_copy_clearsigned (FILE *
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
|
||||||
|
+ if (mutt_strxcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (armor_header)
|
||||||
|
@@ -371,14 +371,14 @@ int pgp_application_pgp_handler (BODY *m
|
||||||
|
{
|
||||||
|
clearsign = 0;
|
||||||
|
|
||||||
|
- 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;
|
||||||
|
@@ -411,10 +411,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)
|
||||||
|
@@ -645,11 +645,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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1137,9 +1137,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);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
pgpewrap.c | 6 ++++++
|
pgpewrap.c | 5 +++++
|
||||||
1 file changed, 6 insertions(+)
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
--- pgpewrap.c
|
--- pgpewrap.c
|
||||||
+++ pgpewrap.c 2017-09-11 11:34:11.241263407 +0000
|
+++ pgpewrap.c 2018-07-04 12:04:58.958652059 +0000
|
||||||
@@ -63,6 +63,12 @@ int main(int argc, char **argv)
|
@@ -58,6 +58,11 @@ int main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
*opt = NULL;
|
*opt = NULL;
|
||||||
|
|
||||||
@ -13,7 +13,6 @@
|
|||||||
+ fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", argv[0]);
|
+ fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", argv[0]);
|
||||||
+ return 1;
|
+ return 1;
|
||||||
+ }
|
+ }
|
||||||
+
|
|
||||||
execvp(opts[0], opts);
|
execvp(opts[0], opts);
|
||||||
perror(argv[0]);
|
perror(argv[0]);
|
||||||
return 2;
|
return 2;
|
||||||
|
@ -1,44 +1,47 @@
|
|||||||
---
|
---
|
||||||
Makefile.am | 4 -
|
Makefile.am | 4 -
|
||||||
lib/file.c | 7 ++-
|
lib.c | 8 ++-
|
||||||
mbox.c | 5 ++
|
mbox.c | 5 ++
|
||||||
mh.c | 8 +++
|
mh.c | 8 +++
|
||||||
mutt.h | 3 +
|
mutt.h | 3 +
|
||||||
opennfs.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
opennfs.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
sendlib.c | 4 +
|
sendlib.c | 4 +
|
||||||
7 files changed, 150 insertions(+), 3 deletions(-)
|
7 files changed, 150 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- Makefile.am
|
--- Makefile.am
|
||||||
+++ Makefile.am 2017-09-11 11:47:43.214350183 +0000
|
+++ Makefile.am 2018-07-04 12:36:51.255902140 +0000
|
||||||
@@ -52,7 +52,7 @@ mutt_SOURCES = account.c addrbook.c addr
|
@@ -32,7 +32,7 @@ mutt_SOURCES = \
|
||||||
handler.c hdrline.c header.h headers.c help.c history.c hook.c \
|
edit.c enter.c flags.c init.c filter.c from.c \
|
||||||
init.c keymap.c list.h main.c mbox.c mbyte.c mbtable.h \
|
getdomain.c group.c \
|
||||||
menu.c mh.c muttlib.c mutt_idna.c mutt_sasl_plain.c mutt_socket.c \
|
handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
|
||||||
- mutt_tunnel.c mx.c newsrc.c nntp.c options.h pager.c parameter.c parameter.h \
|
- main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
|
||||||
+ mutt_tunnel.c mx.c newsrc.c nntp.c opennfs.c options.h pager.c parameter.c parameter.h \
|
+ main.c mbox.c menu.c mh.c mx.c opennfs.c pager.c parse.c pattern.c \
|
||||||
parse.c pattern.c pattern.h pop.c pop_auth.c pop_lib.c postpone.c \
|
postpone.c query.c recvattach.c recvcmd.c \
|
||||||
query.c recvattach.c recvcmd.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
|
rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
|
||||||
rfc822.c safe_asprintf.c score.c send.c sendlib.c sidebar.c signal.c \
|
score.c send.c sendlib.c signal.c sort.c \
|
||||||
@@ -96,7 +96,7 @@ EXTRA_DIST = account.h attach.h bcache.h
|
@@ -85,7 +85,7 @@ mutt_dotlock_SOURCES = mutt_dotlock.c
|
||||||
|
mutt_dotlock_LDADD = $(LIBOBJS)
|
||||||
|
mutt_dotlock_DEPENDENCIES = $(LIBOBJS)
|
||||||
|
|
||||||
EXTRA_SCRIPTS =
|
-pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c
|
||||||
|
+pgpring_SOURCES = opennfs.c pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c
|
||||||
|
pgpring_LDADD = $(LIBOBJS) $(INTLLIBS)
|
||||||
|
pgpring_DEPENDENCIES = $(LIBOBJS) $(INTLDEPS)
|
||||||
|
|
||||||
-pgpring_SOURCES = pgppubring.c
|
--- lib.c
|
||||||
+pgpring_SOURCES = opennfs.c pgppubring.c
|
+++ lib.c 2018-07-04 12:52:11.255140696 +0000
|
||||||
pgpring_LDADD = $(LIBOBJS) $(NCRYPT_LIBS) $(INTLLIBS) $(LIBMUTT)
|
@@ -50,9 +50,9 @@
|
||||||
pgpring_DEPENDENCIES = $(LIBOBJS) $(NCRYPT_DEPS) $(INTLDEPS) $(LIBMUTTDEPS)
|
#define EX_OK 0
|
||||||
|
#endif
|
||||||
|
|
||||||
--- lib/file.c
|
|
||||||
+++ lib/file.c 2017-09-11 11:45:32.960743565 +0000
|
|
||||||
@@ -71,6 +71,7 @@
|
|
||||||
#include "debug.h"
|
|
||||||
#include "memory.h"
|
|
||||||
#include "message.h"
|
|
||||||
+#include "mutt.h"
|
+#include "mutt.h"
|
||||||
#include "string2.h"
|
#include "lib.h"
|
||||||
|
|
||||||
/* these characters must be escaped in regular expressions */
|
-
|
||||||
@@ -502,6 +503,10 @@ int safe_open(const char *path, int flag
|
static const struct sysexits
|
||||||
|
{
|
||||||
|
int v;
|
||||||
|
@@ -633,6 +633,10 @@ int safe_open (const char *path, int fla
|
||||||
struct stat osb, nsb;
|
struct stat osb, nsb;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -49,69 +52,69 @@
|
|||||||
if (flags & O_EXCL)
|
if (flags & O_EXCL)
|
||||||
{
|
{
|
||||||
char safe_file[_POSIX_PATH_MAX];
|
char safe_file[_POSIX_PATH_MAX];
|
||||||
@@ -526,7 +531,7 @@ int safe_open(const char *path, int flag
|
@@ -656,7 +660,7 @@ int safe_open (const char *path, int fla
|
||||||
fd = open(path, flags & ~O_EXCL, 0600);
|
|
||||||
if (fd < 0)
|
if ((fd = open (path, flags & ~O_EXCL, 0600)) < 0)
|
||||||
return fd;
|
return fd;
|
||||||
-
|
-
|
||||||
+#endif
|
+#endif
|
||||||
/* make sure the file is not symlink */
|
/* make sure the file is not symlink */
|
||||||
if ((lstat(path, &osb) < 0 || fstat(fd, &nsb) < 0) || !compare_stat(&osb, &nsb))
|
if (lstat (path, &osb) < 0 || fstat (fd, &nsb) < 0 ||
|
||||||
{
|
compare_stat(&osb, &nsb) == -1)
|
||||||
--- mbox.c
|
--- mbox.c
|
||||||
+++ mbox.c 2017-09-11 11:40:15.902567799 +0000
|
+++ mbox.c 2018-07-04 12:42:52.949313860 +0000
|
||||||
@@ -1075,8 +1075,13 @@ static int mbox_sync_mailbox(struct Cont
|
@@ -867,8 +867,13 @@ static int mbox_sync_mailbox (CONTEXT *c
|
||||||
|
|
||||||
/* Create a temporary file to write the new version of the mailbox in. */
|
/* Create a temporary file to write the new version of the mailbox in. */
|
||||||
mutt_mktemp(tempfile, sizeof(tempfile));
|
mutt_mktemp (tempfile, sizeof (tempfile));
|
||||||
+#if defined(__linux__)
|
+#if defined(__linux__)
|
||||||
+ if ((i = opennfs(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)
|
+ (fp = fdopen(i, "w")) == NULL)
|
||||||
+#else
|
+#else
|
||||||
if ((i = open(tempfile, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1 ||
|
if ((i = open (tempfile, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1 ||
|
||||||
(fp = fdopen(i, "w")) == NULL)
|
(fp = fdopen (i, "w")) == NULL)
|
||||||
+#endif
|
+#endif
|
||||||
{
|
{
|
||||||
if (-1 != i)
|
if (-1 != i)
|
||||||
{
|
{
|
||||||
--- mh.c
|
--- mh.c
|
||||||
+++ mh.c 2017-09-11 11:49:25.892463230 +0000
|
+++ mh.c 2018-07-04 12:46:06.973778914 +0000
|
||||||
@@ -383,7 +383,11 @@ static int mh_mkstemp(struct Context *de
|
@@ -357,7 +357,11 @@ static int mh_mkstemp (CONTEXT * dest, F
|
||||||
{
|
{
|
||||||
snprintf(path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%" PRIu64, dest->path,
|
snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d",
|
||||||
NONULL(ShortHostname), (int) getpid(), mutt_rand64());
|
dest->path, NONULL (Hostname), (int) getpid (), Counter++);
|
||||||
+#if defined(__linux__)
|
+#if defined(__linux__)
|
||||||
+ if ((fd = opennfs(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
+ if ((fd = opennfs(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
||||||
+#else
|
+#else
|
||||||
if ((fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
||||||
+#endif
|
+#endif
|
||||||
{
|
{
|
||||||
if (errno != EEXIST)
|
if (errno != EEXIST)
|
||||||
{
|
{
|
||||||
@@ -1518,7 +1522,11 @@ static int maildir_open_new_message(stru
|
@@ -1496,7 +1500,11 @@ static int maildir_open_new_message (MES
|
||||||
|
dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
|
||||||
mutt_debug(2, "maildir_open_new_message (): Trying %s.\n", path);
|
path));
|
||||||
|
|
||||||
+#if defined(__linux__)
|
+#if defined(__linux__)
|
||||||
+ if ((fd = opennfs(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
+ if ((fd = opennfs(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
||||||
+#else
|
+#else
|
||||||
if ((fd = open(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
|
||||||
+#endif
|
+#endif
|
||||||
{
|
{
|
||||||
if (errno != EEXIST)
|
if (errno != EEXIST)
|
||||||
{
|
{
|
||||||
--- mutt.h
|
--- mutt.h
|
||||||
+++ mutt.h 2017-09-11 11:50:18.979487541 +0000
|
+++ mutt.h 2018-07-04 12:50:36.504867472 +0000
|
||||||
@@ -367,4 +367,7 @@ extern char *debugfile_cmdline;
|
@@ -1086,4 +1086,7 @@ typedef struct
|
||||||
extern int debuglevel_cmdline;
|
#include "lib.h"
|
||||||
#endif
|
#include "globals.h"
|
||||||
|
|
||||||
+#if defined(__linux__)
|
+#if defined(__linux__)
|
||||||
+extern int opennfs(const char *, int, int);
|
+extern int opennfs(const char *, int, int);
|
||||||
+#endif
|
+#endif
|
||||||
#endif /* _MUTT_H */
|
#endif /*MUTT_H*/
|
||||||
--- opennfs.c
|
--- opennfs.c
|
||||||
+++ opennfs.c 2017-09-11 11:40:15.906567726 +0000
|
+++ opennfs.c 2018-07-04 12:19:44.426572384 +0000
|
||||||
@@ -0,0 +1,122 @@
|
@@ -0,0 +1,122 @@
|
||||||
+#include <errno.h>
|
+#include <errno.h>
|
||||||
+#include <fcntl.h>
|
+#include <fcntl.h>
|
||||||
@ -236,16 +239,16 @@
|
|||||||
+ return open(path, flags, mode);
|
+ return open(path, flags, mode);
|
||||||
+}
|
+}
|
||||||
--- sendlib.c
|
--- sendlib.c
|
||||||
+++ sendlib.c 2017-09-11 11:40:15.906567726 +0000
|
+++ sendlib.c 2018-07-04 12:47:53.063845836 +0000
|
||||||
@@ -2354,7 +2354,11 @@ static int send_msg(const char *path, ch
|
@@ -2256,7 +2256,11 @@ send_msg (const char *path, char **args,
|
||||||
if (SendmailWait >= 0 && tempfile && *tempfile)
|
if (SendmailWait >= 0 && tempfile && *tempfile)
|
||||||
{
|
{
|
||||||
/* *tempfile will be opened as stdout */
|
/* *tempfile will be opened as stdout */
|
||||||
+#if defined(__linux__)
|
+#if defined(__linux__)
|
||||||
+ if (opennfs(*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
|
+ if (opennfs(*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
|
||||||
+#else
|
+#else
|
||||||
if (open(*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
|
if (open (*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
|
||||||
+#endif
|
+#endif
|
||||||
_exit(S_ERR);
|
_exit (S_ERR);
|
||||||
/* redirect stderr to *tempfile too */
|
/* redirect stderr to *tempfile too */
|
||||||
if (dup(1) < 0)
|
if (dup (1) < 0)
|
||||||
|
@ -1,294 +0,0 @@
|
|||||||
---
|
|
||||||
imap/command.c | 47 +++++++++++++++++++++++-------
|
|
||||||
imap/imap.c | 79 +++++++++++++++++++++++++++++++++++++++-------------
|
|
||||||
imap/imap_private.h | 2 -
|
|
||||||
imap/message.c | 6 +--
|
|
||||||
4 files changed, 99 insertions(+), 35 deletions(-)
|
|
||||||
|
|
||||||
--- imap/command.c
|
|
||||||
+++ imap/command.c 2017-10-24 14:15:49.011057645 +0000
|
|
||||||
@@ -146,6 +146,7 @@ static void cmd_handle_fatal(struct Imap
|
|
||||||
if ((idata->state >= IMAP_SELECTED) && (idata->reopen & IMAP_REOPEN_ALLOW))
|
|
||||||
{
|
|
||||||
mx_fastclose_mailbox(idata->ctx);
|
|
||||||
+ mutt_socket_close(idata->conn);
|
|
||||||
mutt_error(_("Mailbox closed"));
|
|
||||||
mutt_sleep(1);
|
|
||||||
idata->state = IMAP_DISCONNECTED;
|
|
||||||
@@ -257,7 +258,7 @@ static void cmd_parse_expunge(struct Ima
|
|
||||||
*/
|
|
||||||
static void cmd_parse_fetch(struct ImapData *idata, char *s)
|
|
||||||
{
|
|
||||||
- unsigned int msn;
|
|
||||||
+ unsigned int msn, uid;
|
|
||||||
struct Header *h = NULL;
|
|
||||||
|
|
||||||
mutt_debug(3, "Handling FETCH\n");
|
|
||||||
@@ -288,19 +289,41 @@ static void cmd_parse_fetch(struct ImapD
|
|
||||||
}
|
|
||||||
s++;
|
|
||||||
|
|
||||||
- if (mutt_strncasecmp("FLAGS", s, 5) != 0)
|
|
||||||
+ while (*s)
|
|
||||||
{
|
|
||||||
- mutt_debug(2, "Only handle FLAGS updates\n");
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
+ SKIPWS (s);
|
|
||||||
|
|
||||||
- /* If server flags could conflict with mutt's flags, reopen the mailbox. */
|
|
||||||
- if (h->changed)
|
|
||||||
- idata->reopen |= IMAP_EXPUNGE_PENDING;
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- imap_set_flags(idata, h, s);
|
|
||||||
- idata->check_status = IMAP_FLAGS_PENDING;
|
|
||||||
+ if (mutt_strncasecmp ("FLAGS", s, 5) == 0)
|
|
||||||
+ {
|
|
||||||
+ /* If server flags could conflict with mutt's flags, reopen the mailbox. */
|
|
||||||
+ if (h->changed)
|
|
||||||
+ idata->reopen |= IMAP_EXPUNGE_PENDING;
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ imap_set_flags (idata, h, s);
|
|
||||||
+ idata->check_status = IMAP_FLAGS_PENDING;
|
|
||||||
+ }
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ else if (mutt_strncasecmp ("UID", s, 3) == 0)
|
|
||||||
+ {
|
|
||||||
+ s += 3;
|
|
||||||
+ SKIPWS (s);
|
|
||||||
+ uid = (unsigned int) atoi (s);
|
|
||||||
+ if (uid != HEADER_DATA(h)->uid)
|
|
||||||
+ {
|
|
||||||
+ mutt_debug(2, "FETCH UID vs MSN mismatch. Skipping update.\n");
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ s = imap_next_word (s);
|
|
||||||
+ }
|
|
||||||
+ else if (*s == ')')
|
|
||||||
+ s++; /* end of request */
|
|
||||||
+ else if (*s)
|
|
||||||
+ {
|
|
||||||
+ mutt_debug(2, "Only handle FLAGS updates\n");
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
--- imap/imap.c
|
|
||||||
+++ imap/imap.c 2017-10-24 14:27:08.002351735 +0000
|
|
||||||
@@ -318,7 +318,26 @@ void imap_expunge_mailbox(struct ImapDat
|
|
||||||
imap_free_header_data((struct ImapHeaderData **) &h->data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
+ {
|
|
||||||
h->index = i;
|
|
||||||
+ /* Mutt has several places where it turns off h->active as a
|
|
||||||
+ * hack. For example to avoid FLAG updates, or to exclude from
|
|
||||||
+ * imap_exec_msgset.
|
|
||||||
+ *
|
|
||||||
+ * Unfortunately, when a reopen is allowed and the IMAP_EXPUNGE_PENDING
|
|
||||||
+ * flag becomes set (e.g. a flag update to a modified header),
|
|
||||||
+ * this function will be called by imap_cmd_finish().
|
|
||||||
+ *
|
|
||||||
+ * The mx_update_tables() will free and remove these "inactive" headers,
|
|
||||||
+ * despite that an EXPUNGE was not received for them.
|
|
||||||
+ * This would result in memory leaks and segfaults due to dangling
|
|
||||||
+ * pointers in the msn_index and uid_hash.
|
|
||||||
+ *
|
|
||||||
+ * So this is another hack to work around the hacks. We don't want to
|
|
||||||
+ * remove the messages, so make sure active is on.
|
|
||||||
+ */
|
|
||||||
+ h->active = 1;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef USE_HCACHE
|
|
||||||
@@ -1094,7 +1113,7 @@ out:
|
|
||||||
* compare_flags - Compare local flags against the server
|
|
||||||
* @retval 0 if mutt's flags match cached server flags
|
|
||||||
*/
|
|
||||||
-static bool compare_flags(struct Header *h)
|
|
||||||
+static bool compare_flags_for_copy(struct Header *h)
|
|
||||||
{
|
|
||||||
struct ImapHeaderData *hd = (struct ImapHeaderData *) h->data;
|
|
||||||
|
|
||||||
@@ -1106,16 +1125,17 @@ static bool compare_flags(struct Header
|
|
||||||
return true;
|
|
||||||
if (h->replied != hd->replied)
|
|
||||||
return true;
|
|
||||||
- if (h->deleted != hd->deleted)
|
|
||||||
- return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
- * imap_sync_message - Update server to reflect the flags of a single message
|
|
||||||
+ * imap_sync_message - Update the IMAP server to reflect the flags for a single message before
|
|
||||||
+ * performing a "UID COPY".
|
|
||||||
+ * NOTE: This does not sync the "deleted" flag state, because it is not
|
|
||||||
+ * desirable to propagate that flag into the copy.
|
|
||||||
*/
|
|
||||||
-int imap_sync_message(struct ImapData *idata, struct Header *hdr,
|
|
||||||
+int imap_sync_message_for_copy(struct ImapData *idata, struct Header *hdr,
|
|
||||||
struct Buffer *cmd, int *err_continue)
|
|
||||||
{
|
|
||||||
char flags[LONG_STRING];
|
|
||||||
@@ -1123,9 +1143,13 @@ int imap_sync_message(struct ImapData *i
|
|
||||||
|
|
||||||
hdr->changed = false;
|
|
||||||
|
|
||||||
- if (!compare_flags(hdr))
|
|
||||||
+ if (!compare_flags_for_copy(hdr))
|
|
||||||
{
|
|
||||||
- idata->ctx->changed = false;
|
|
||||||
+ if (hdr->deleted == HEADER_DATA(hdr)->deleted)
|
|
||||||
+ {
|
|
||||||
+ hdr->changed = 0;
|
|
||||||
+ idata->ctx->changed = false;
|
|
||||||
+ }
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1140,7 +1164,7 @@ int imap_sync_message(struct ImapData *i
|
|
||||||
imap_set_flag(idata, MUTT_ACL_WRITE, hdr->old, "Old ", flags, sizeof(flags));
|
|
||||||
imap_set_flag(idata, MUTT_ACL_WRITE, hdr->flagged, "\\Flagged ", flags, sizeof(flags));
|
|
||||||
imap_set_flag(idata, MUTT_ACL_WRITE, hdr->replied, "\\Answered ", flags, sizeof(flags));
|
|
||||||
- imap_set_flag(idata, MUTT_ACL_DELETE, hdr->deleted, "\\Deleted ", flags, sizeof(flags));
|
|
||||||
+ imap_set_flag(idata, MUTT_ACL_DELETE, HEADER_DATA(hdr)->deleted, "\\Deleted ", flags, sizeof(flags));
|
|
||||||
|
|
||||||
/* now make sure we don't lose custom tags */
|
|
||||||
if (mutt_bit_isset(idata->ctx->rights, MUTT_ACL_WRITE))
|
|
||||||
@@ -1156,7 +1180,7 @@ int imap_sync_message(struct ImapData *i
|
|
||||||
imap_set_flag(idata, MUTT_ACL_WRITE, 1, "Old ", flags, sizeof(flags));
|
|
||||||
imap_set_flag(idata, MUTT_ACL_WRITE, 1, "\\Flagged ", flags, sizeof(flags));
|
|
||||||
imap_set_flag(idata, MUTT_ACL_WRITE, 1, "\\Answered ", flags, sizeof(flags));
|
|
||||||
- imap_set_flag(idata, MUTT_ACL_DELETE, 1, "\\Deleted ", flags, sizeof(flags));
|
|
||||||
+ imap_set_flag (idata, MUTT_ACL_DELETE, !HEADER_DATA(hdr)->deleted, "\\Deleted ", flags, sizeof (flags));
|
|
||||||
|
|
||||||
mutt_remove_trailing_ws(flags);
|
|
||||||
|
|
||||||
@@ -1178,11 +1202,17 @@ int imap_sync_message(struct ImapData *i
|
|
||||||
{
|
|
||||||
*err_continue = imap_continue("imap_sync_message: STORE failed", idata->buf);
|
|
||||||
if (*err_continue != MUTT_YES)
|
|
||||||
+ {
|
|
||||||
+ hdr->active = 1;
|
|
||||||
return -1;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
- hdr->active = true;
|
|
||||||
- idata->ctx->changed = false;
|
|
||||||
+ if (hdr->deleted == HEADER_DATA(hdr)->deleted)
|
|
||||||
+ {
|
|
||||||
+ hdr->active = true;
|
|
||||||
+ idata->ctx->changed = false;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1637,7 +1667,7 @@ int imap_buffy_check(int force, int chec
|
|
||||||
{
|
|
||||||
/* Send commands to previous server. Sorting the buffy list
|
|
||||||
* may prevent some infelicitous interleavings */
|
|
||||||
- if (imap_exec(lastdata, NULL, IMAP_CMD_FAIL_OK) == -1)
|
|
||||||
+ if (imap_exec(lastdata, NULL, IMAP_CMD_FAIL_OK | IMAP_CMD_POLL) == -1)
|
|
||||||
mutt_debug(1, "Error polling mailboxes\n");
|
|
||||||
|
|
||||||
lastdata = NULL;
|
|
||||||
@@ -2214,9 +2244,11 @@ int imap_fast_trash(struct Context *ctx,
|
|
||||||
char mbox[LONG_STRING];
|
|
||||||
char mmbox[LONG_STRING];
|
|
||||||
char prompt[LONG_STRING];
|
|
||||||
- int rc;
|
|
||||||
+ int n, rc;
|
|
||||||
struct ImapMbox mx;
|
|
||||||
bool triedcreate = false;
|
|
||||||
+ struct Buffer *sync_cmd = NULL;
|
|
||||||
+ int err_continue = MUTT_NO;
|
|
||||||
|
|
||||||
idata = ctx->data;
|
|
||||||
|
|
||||||
@@ -2238,16 +2270,24 @@ int imap_fast_trash(struct Context *ctx,
|
|
||||||
strfcpy(mbox, "INBOX", sizeof(mbox));
|
|
||||||
imap_munge_mbox_name(idata, mmbox, sizeof(mmbox), mbox);
|
|
||||||
|
|
||||||
- /* loop in case of TRYCREATE */
|
|
||||||
- do
|
|
||||||
+ sync_cmd = mutt_buffer_new ();
|
|
||||||
+ for (n = 0; n < ctx->msgcount; n++)
|
|
||||||
{
|
|
||||||
- rc = imap_exec_msgset(idata, "UID STORE", "+FLAGS.SILENT (\\Seen)", MUTT_TRASH, 0, 0);
|
|
||||||
- if (rc < 0)
|
|
||||||
+ if (ctx->hdrs[n]->active && ctx->hdrs[n]->changed &&
|
|
||||||
+ ctx->hdrs[n]->deleted && !ctx->hdrs[n]->purge)
|
|
||||||
{
|
|
||||||
- mutt_debug(1, "imap_fast_trash: Unable to mark messages as seen\n");
|
|
||||||
- goto out;
|
|
||||||
+ rc = imap_sync_message_for_copy (idata, ctx->hdrs[n], sync_cmd, &err_continue);
|
|
||||||
+ if (rc < 0)
|
|
||||||
+ {
|
|
||||||
+ mutt_debug(1, "imap_fast_trash: could not sync\n");
|
|
||||||
+ goto out;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
+ }
|
|
||||||
|
|
||||||
+ /* loop in case of TRYCREATE */
|
|
||||||
+ do
|
|
||||||
+ {
|
|
||||||
rc = imap_exec_msgset(idata, "UID COPY", mmbox, MUTT_TRASH, 0, 0);
|
|
||||||
if (!rc)
|
|
||||||
{
|
|
||||||
@@ -2297,6 +2337,7 @@ int imap_fast_trash(struct Context *ctx,
|
|
||||||
rc = 0;
|
|
||||||
|
|
||||||
out:
|
|
||||||
+ mutt_buffer_free (&sync_cmd);
|
|
||||||
FREE(&mx.mbox);
|
|
||||||
|
|
||||||
return rc < 0 ? -1 : rc;
|
|
||||||
--- imap/imap_private.h
|
|
||||||
+++ imap/imap_private.h 2017-10-24 14:15:49.015057570 +0000
|
|
||||||
@@ -279,7 +279,7 @@ struct ImapData *imap_conn_find(const st
|
|
||||||
int imap_read_literal(FILE *fp, struct ImapData *idata, long bytes, struct Progress *pbar);
|
|
||||||
void imap_expunge_mailbox(struct ImapData *idata);
|
|
||||||
void imap_logout(struct ImapData **idata);
|
|
||||||
-int imap_sync_message(struct ImapData *idata, struct Header *hdr, struct Buffer *cmd, int *err_continue);
|
|
||||||
+int imap_sync_message_for_copy(struct ImapData *idata, struct Header *hdr, struct Buffer *cmd, int *err_continue);
|
|
||||||
bool imap_has_flag(struct ListHead *flag_list, const char *flag);
|
|
||||||
|
|
||||||
/* auth.c */
|
|
||||||
--- imap/message.c
|
|
||||||
+++ imap/message.c 2017-10-24 14:15:49.015057570 +0000
|
|
||||||
@@ -1261,7 +1261,7 @@ int imap_copy_messages(struct Context *c
|
|
||||||
|
|
||||||
if (ctx->hdrs[n]->tagged && ctx->hdrs[n]->active && ctx->hdrs[n]->changed)
|
|
||||||
{
|
|
||||||
- rc = imap_sync_message(idata, ctx->hdrs[n], &sync_cmd, &err_continue);
|
|
||||||
+ rc = imap_sync_message_for_copy(idata, ctx->hdrs[n], &sync_cmd, &err_continue);
|
|
||||||
if (rc < 0)
|
|
||||||
{
|
|
||||||
mutt_debug(1, "imap_copy_messages: could not sync\n");
|
|
||||||
@@ -1292,7 +1292,7 @@ int imap_copy_messages(struct Context *c
|
|
||||||
|
|
||||||
if (h->active && h->changed)
|
|
||||||
{
|
|
||||||
- rc = imap_sync_message(idata, h, &sync_cmd, &err_continue);
|
|
||||||
+ rc = imap_sync_message_for_copy(idata, h, &sync_cmd, &err_continue);
|
|
||||||
if (rc < 0)
|
|
||||||
{
|
|
||||||
mutt_debug(1, "imap_copy_messages: could not sync\n");
|
|
||||||
@@ -1444,7 +1444,7 @@ char *imap_set_flags(struct ImapData *id
|
|
||||||
hd = h->data;
|
|
||||||
newh.data = hd;
|
|
||||||
|
|
||||||
- mutt_debug(2, "imap_fetch_message: parsing FLAGS\n");
|
|
||||||
+ mutt_debug(2, "imap_set_flags: parsing FLAGS\n");
|
|
||||||
if ((s = msg_parse_flags(&newh, s)) == NULL)
|
|
||||||
return NULL;
|
|
||||||
|
|
116
mutt-1.9.1.dif
116
mutt-1.9.1.dif
@ -1,116 +0,0 @@
|
|||||||
---
|
|
||||||
configure.ac | 10 +++++++++-
|
|
||||||
doc/Muttrc.head | 2 +-
|
|
||||||
imap/auth.c | 20 ++++++++++++++++++++
|
|
||||||
init.h | 3 +++
|
|
||||||
mx.c | 3 +++
|
|
||||||
5 files changed, 36 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
--- configure.ac
|
|
||||||
+++ configure.ac 2017-09-11 11:24:08.296326161 +0000
|
|
||||||
@@ -337,7 +337,7 @@ main ()
|
|
||||||
mutt_cv_slang=$withval
|
|
||||||
if test -d $withval/include/slang; then
|
|
||||||
CPPFLAGS="$CPPFLAGS -I${withval}/include/slang"
|
|
||||||
- elif test -d $withval/include; then
|
|
||||||
+ elif test -d $withval/include && test $withval != /usr ; then
|
|
||||||
CPPFLAGS="$CPPFLAGS -I${withval}/include"
|
|
||||||
fi
|
|
||||||
LDFLAGS="$LDFLAGS -L${withval}/lib"
|
|
||||||
@@ -510,8 +510,12 @@ dnl -- end imap dependencies --
|
|
||||||
AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl@<:@=PFX@:>@],[Enable TLS support using OpenSSL]),
|
|
||||||
[ if test "$with_ssl" != "no"; then
|
|
||||||
if test "$with_ssl" != "yes"; then
|
|
||||||
+ case $withval in /usr|/usr/local) ;;
|
|
||||||
+ *)
|
|
||||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
fi
|
|
||||||
saved_LIBS="$LIBS"
|
|
||||||
|
|
||||||
@@ -574,8 +578,12 @@ AC_ARG_WITH(sasl, AS_HELP_STRING([--with
|
|
||||||
[
|
|
||||||
if test "$with_sasl" != "no"; then
|
|
||||||
if test "$with_sasl" != "yes"; then
|
|
||||||
+ case $with_sasl in /usr|/usr/local) ;;
|
|
||||||
+ *)
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$with_sasl/include"
|
|
||||||
LDFLAGS="$LDFLAGS -L$with_sasl/lib"
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# OpenSolaris provides a SASL2 interface in libsasl
|
|
||||||
--- doc/Muttrc.head
|
|
||||||
+++ doc/Muttrc.head 2017-09-11 11:24:59.871380290 +0000
|
|
||||||
@@ -23,7 +23,7 @@ macro index,pager,attach,compose \cb "\
|
|
||||||
"call urlview to extract URLs out of a message"
|
|
||||||
|
|
||||||
# Show documentation when pressing F1
|
|
||||||
-macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
|
|
||||||
+macro generic,index,pager <F1> "<shell-escape> less @docdir@/manual.txt.gz<Enter>" "show Mutt documentation"
|
|
||||||
|
|
||||||
# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
|
|
||||||
macro index,pager y "<change-folder>?" "show incoming mailboxes list"
|
|
||||||
--- imap/auth.c
|
|
||||||
+++ imap/auth.c 2017-09-11 11:26:50.141357697 +0000
|
|
||||||
@@ -80,6 +80,23 @@ int imap_authenticate(struct ImapData *i
|
|
||||||
mutt_debug(2, "imap_authenticate: Trying method %s\n", method);
|
|
||||||
authenticator = imap_authenticators;
|
|
||||||
|
|
||||||
+#ifdef USE_SASL
|
|
||||||
+ /* "login" not supported by SASL */
|
|
||||||
+ if (!mutt_strcasecmp ("login", method))
|
|
||||||
+ {
|
|
||||||
+ while (authenticator->authenticate)
|
|
||||||
+ {
|
|
||||||
+ const char *identify = authenticator->method;
|
|
||||||
+ if (identify && !mutt_strcasecmp(identify, method))
|
|
||||||
+ if ((r = authenticator->authenticate(idata, method)) != IMAP_AUTH_UNAVAIL)
|
|
||||||
+ {
|
|
||||||
+ FREE(&methods);
|
|
||||||
+ return r;
|
|
||||||
+ }
|
|
||||||
+ authenticator++;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+#endif
|
|
||||||
while (authenticator->authenticate)
|
|
||||||
{
|
|
||||||
if (!authenticator->method || (mutt_strcasecmp(authenticator->method, method) == 0))
|
|
||||||
@@ -91,6 +108,9 @@ int imap_authenticate(struct ImapData *i
|
|
||||||
|
|
||||||
authenticator++;
|
|
||||||
}
|
|
||||||
+#ifdef USE_SASL
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
FREE(&methods);
|
|
||||||
--- init.h
|
|
||||||
+++ init.h 2017-09-11 11:27:51.208237439 +0000
|
|
||||||
@@ -3864,6 +3864,9 @@ struct Option MuttVars[] = {
|
|
||||||
** the default from the GNUTLS library.
|
|
||||||
*/
|
|
||||||
#endif /* USE_SSL_GNUTLS */
|
|
||||||
+#if defined(USE_IMAP) && defined(SUSE_IMAP_FORCE_SSL)
|
|
||||||
+ { "imap_force_ssl", DT_SYN, R_NONE, UL "ssl_force_tls", 0 },
|
|
||||||
+#endif
|
|
||||||
{ "ssl_starttls", DT_QUAD, R_NONE, OPT_SSL_STARTTLS, MUTT_YES },
|
|
||||||
/*
|
|
||||||
** .pp
|
|
||||||
--- mx.c
|
|
||||||
+++ mx.c 2017-09-11 11:14:29.263001870 +0000
|
|
||||||
@@ -1287,6 +1287,9 @@ void mx_update_context(struct Context *c
|
|
||||||
{
|
|
||||||
h = ctx->hdrs[msgno];
|
|
||||||
|
|
||||||
+ if (!h)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
if (WithCrypto)
|
|
||||||
{
|
|
||||||
/* NOTE: this _must_ be done before the check for mailcap! */
|
|
23
mutt.changes
23
mutt.changes
@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 5 11:41:44 UTC 2018 - werner@suse.de
|
||||||
|
|
||||||
|
- Skip neomutt now (boo#1094717)
|
||||||
|
* There exists a package neomutt
|
||||||
|
* mutt-1.10.0 uses a lot of extensions now like compessed folders
|
||||||
|
and header caching, but still misses things like notmuch
|
||||||
|
- Modified patches
|
||||||
|
* aw.listreply.diff
|
||||||
|
* bsc907453-CVE-2014-9116-jessie.patch
|
||||||
|
* bug-676388-largefile.patch
|
||||||
|
* mutt-1.5.15-wrapcolumn.diff
|
||||||
|
* mutt-1.5.20-sendgroupreplyto.diff
|
||||||
|
* mutt-1.5.21-mailcap.diff
|
||||||
|
* mutt-1.5.23-carriage-return.path
|
||||||
|
* mutt-1.5.9i-pgpewrap.diff
|
||||||
|
* mutt-1.6.1-opennfs.dif
|
||||||
|
* patch-1.5.24.vk.pgp_verbose_mime
|
||||||
|
* widechar.sidebar.dif
|
||||||
|
- Renamed patch: mutt-1.9.1.dif becomes mutt-1.10.0.dif
|
||||||
|
- Deleted patches mutt-1.9.0-1.9.1.patch neomutt-c030a8b.patch
|
||||||
|
- Add patch truncate.patch to avoid truncated buffers due snprintf
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 24 14:33:00 UTC 2017 - werner@suse.de
|
Tue Oct 24 14:33:00 UTC 2017 - werner@suse.de
|
||||||
|
|
||||||
|
109
mutt.spec
109
mutt.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package mutt
|
# spec file for package mutt
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,8 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%bcond_without mutt_openssl
|
%bcond_with mutt_openssl
|
||||||
%bcond_with mutt_gnutls
|
%bcond_without mutt_gnutls
|
||||||
|
|
||||||
Name: mutt
|
Name: mutt
|
||||||
%if %{with mutt_openssl}
|
%if %{with mutt_openssl}
|
||||||
@ -28,30 +28,39 @@ BuildRequires: pkgconfig(gnutls)
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: cyrus-sasl-devel
|
|
||||||
BuildRequires: cyrus-sasl-gssapi
|
BuildRequires: cyrus-sasl-gssapi
|
||||||
BuildRequires: docbook-xsl-stylesheets
|
BuildRequires: docbook-xsl-stylesheets
|
||||||
BuildRequires: gdbm-devel
|
|
||||||
BuildRequires: hunspell
|
BuildRequires: hunspell
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: iso_ent
|
||||||
BuildRequires: libgpgme-devel
|
BuildRequires: libgpgme-devel
|
||||||
BuildRequires: libidn-devel
|
|
||||||
BuildRequires: libkyotocabinet-devel
|
|
||||||
BuildRequires: libxslt-tools
|
BuildRequires: libxslt-tools
|
||||||
BuildRequires: lua-devel
|
|
||||||
BuildRequires: ncurses-devel
|
|
||||||
%if 0%{?is_opensuse}
|
|
||||||
BuildRequires: notmuch-devel
|
|
||||||
%endif
|
|
||||||
BuildRequires: opensp
|
BuildRequires: opensp
|
||||||
|
BuildRequires: pkgconfig(gssrpc)
|
||||||
|
BuildRequires: pkgconfig(krb5)
|
||||||
|
%if 0%{?suse_version} > 1315
|
||||||
|
BuildRequires: pkgconfig(kyotocabinet)
|
||||||
|
%else
|
||||||
|
BuildRequires: libkyotocabinet-devel
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} > 1315
|
||||||
|
BuildRequires: pkgconfig(libidn2)
|
||||||
|
%else
|
||||||
|
BuildRequires: pkgconfig(libidn)
|
||||||
|
%endif
|
||||||
|
BuildRequires: pkgconfig(libsasl2)
|
||||||
|
%if 0%{?suse_version} > 1315
|
||||||
|
BuildRequires: pkgconfig(ncurses)
|
||||||
|
%else
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
%endif
|
||||||
%if 0%{?suse_version} > 1130
|
%if 0%{?suse_version} > 1130
|
||||||
BuildRequires: shared-mime-info
|
BuildRequires: pkgconfig(shared-mime-info)
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: w3m
|
BuildRequires: w3m
|
||||||
Url: http://www.neomutt.org
|
Url: http://www.mutt.org
|
||||||
Recommends: hunspell
|
Recommends: hunspell
|
||||||
Provides: muttssl
|
Provides: muttssl
|
||||||
Obsoletes: muttssl
|
Obsoletes: muttssl
|
||||||
@ -64,17 +73,14 @@ Recommends: w3m
|
|||||||
Requires(post): shared-mime-info
|
Requires(post): shared-mime-info
|
||||||
Requires(postun): shared-mime-info
|
Requires(postun): shared-mime-info
|
||||||
%endif
|
%endif
|
||||||
%global neo 20170912
|
Version: 1.10.0
|
||||||
Version: 1.9.1
|
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Mail Program
|
Summary: Mail Program
|
||||||
# ftp://ftp.mutt.org/mutt/devel/
|
# ftp://ftp.mutt.org/mutt/devel/
|
||||||
# https://bitbucket.org/mutt/mutt/downloads/%%name-%%version.tar.gz
|
# https/bitbucket.org/mutt/mutt/downloads/%%name-%%version.tar.gz
|
||||||
# Switch over to neomutt tar ball which is based on original mutt
|
License: GPL-2.0-or-later
|
||||||
# http://www.neomutt.org/
|
|
||||||
License: GPL-2.0+
|
|
||||||
Group: Productivity/Networking/Email/Clients
|
Group: Productivity/Networking/Email/Clients
|
||||||
Source0: https://github.com/neomutt/neomutt/archive/neomutt-%{neo}.tar.gz
|
Source0: https/bitbucket.org/mutt/mutt/downloads/mutt-%version.tar.gz
|
||||||
Source1: Signature_conversion
|
Source1: Signature_conversion
|
||||||
Source2: README.alternates
|
Source2: README.alternates
|
||||||
Source3: mutt.png
|
Source3: mutt.png
|
||||||
@ -99,10 +105,8 @@ Patch16: mutt-1.5.23-carriage-return.path
|
|||||||
Patch18: mutt-1.5.21-mailcap.diff
|
Patch18: mutt-1.5.21-mailcap.diff
|
||||||
# PATCH-FIX-SUSE: bsc#907453 - CVE-2014-9116: mutt: heap-based buffer overflow in mutt_substrdup()
|
# PATCH-FIX-SUSE: bsc#907453 - CVE-2014-9116: mutt: heap-based buffer overflow in mutt_substrdup()
|
||||||
Patch19: bsc907453-CVE-2014-9116-jessie.patch
|
Patch19: bsc907453-CVE-2014-9116-jessie.patch
|
||||||
# PATCH-FIX-UPSTREAM: bsc#1061343 - (neo)mutt displaying times in Zulu time
|
# PATCH-FIX-SUSE: Silent gcc about truncated buffer with snprintf()
|
||||||
Patch20: neomutt-c030a8b.patch
|
Patch20: truncate.patch
|
||||||
# PATCH-UPSTREAM-MUTT: Port diff-1.9.0-1.9.1 to neomutt tree
|
|
||||||
Patch42: mutt-1.9.0-1.9.1.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%global _sysconfdir %{_sysconfdir}
|
%global _sysconfdir %{_sysconfdir}
|
||||||
|
|
||||||
@ -135,7 +139,6 @@ BuildArch: noarch
|
|||||||
Provides translations to the package mutt.
|
Provides translations to the package mutt.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
ln -sf neomutt-neomutt-%neo mutt-%version
|
|
||||||
%setup -q -D -n mutt-%version
|
%setup -q -D -n mutt-%version
|
||||||
%patch -p0 -b .p0
|
%patch -p0 -b .p0
|
||||||
%patch2 -p0 -b .pgpewrap
|
%patch2 -p0 -b .pgpewrap
|
||||||
@ -149,10 +152,7 @@ ln -sf neomutt-neomutt-%neo mutt-%version
|
|||||||
%patch16 -p0 -b .crlf
|
%patch16 -p0 -b .crlf
|
||||||
%patch18 -p0 -b .mailcap
|
%patch18 -p0 -b .mailcap
|
||||||
%patch19 -p0 -b .cvw2014.9116
|
%patch19 -p0 -b .cvw2014.9116
|
||||||
%patch20 -p1 -b .zulu
|
%patch20 -p0 -b .trc
|
||||||
%patch42 -p0 -b .191
|
|
||||||
rm -vf README*.orig
|
|
||||||
rm -vf PATCHES*.orig
|
|
||||||
|
|
||||||
cp %{S:2} .
|
cp %{S:2} .
|
||||||
|
|
||||||
@ -186,7 +186,6 @@ autoreconf -fi
|
|||||||
}
|
}
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE"
|
CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE"
|
||||||
#cflags -DSUSE_IMAP_FORCE_SSL CFLAGS
|
|
||||||
cflags -fno-strict-aliasing CFLAGS
|
cflags -fno-strict-aliasing CFLAGS
|
||||||
cflags -fstack-protector CFLAGS
|
cflags -fstack-protector CFLAGS
|
||||||
cflags -fPIE CFLAGS
|
cflags -fPIE CFLAGS
|
||||||
@ -194,7 +193,6 @@ cflags -g3 CFLAGS
|
|||||||
cflags -pipe CFLAGS
|
cflags -pipe CFLAGS
|
||||||
cflags -Wl,--as-needed LDFLAGS
|
cflags -Wl,--as-needed LDFLAGS
|
||||||
cflags -Wl,-O2 LDFLAGS
|
cflags -Wl,-O2 LDFLAGS
|
||||||
cflags -Wl,--hash-size=8599 LDFLAGS
|
|
||||||
cflags -pie LDFLAGS
|
cflags -pie LDFLAGS
|
||||||
export CC CFLAGS LDFLAGS
|
export CC CFLAGS LDFLAGS
|
||||||
export SENDMAIL=/usr/sbin/sendmail
|
export SENDMAIL=/usr/sbin/sendmail
|
||||||
@ -206,12 +204,12 @@ $KRB5CFGPATH --libs gssapi
|
|||||||
$KRB5CFGPATH --version
|
$KRB5CFGPATH --version
|
||||||
%configure \
|
%configure \
|
||||||
--with-docdir=%{_docdir}/%name \
|
--with-docdir=%{_docdir}/%name \
|
||||||
--without-ssl \
|
|
||||||
--without-gnutls \
|
|
||||||
%if %{with mutt_openssl}
|
%if %{with mutt_openssl}
|
||||||
|
--without-gnutls \
|
||||||
--with-ssl=%{_prefix} \
|
--with-ssl=%{_prefix} \
|
||||||
%endif
|
%endif
|
||||||
%if %{with mutt_gnutls}
|
%if %{with mutt_gnutls}
|
||||||
|
--without-ssl \
|
||||||
--with-gnutls=%{_prefix} \
|
--with-gnutls=%{_prefix} \
|
||||||
%endif
|
%endif
|
||||||
--enable-imap \
|
--enable-imap \
|
||||||
@ -222,19 +220,19 @@ $KRB5CFGPATH --version
|
|||||||
--enable-mailtool \
|
--enable-mailtool \
|
||||||
--enable-compressed \
|
--enable-compressed \
|
||||||
--enable-sidebar \
|
--enable-sidebar \
|
||||||
%if 0%{?is_opensuse}
|
|
||||||
--enable-notmuch \
|
|
||||||
%endif
|
|
||||||
--disable-external-dotlock \
|
--disable-external-dotlock \
|
||||||
--with-gdbm \
|
|
||||||
--with-kyotocabinet \
|
--with-kyotocabinet \
|
||||||
--with-sasl=%{_prefix} \
|
--with-sasl=%{_prefix} \
|
||||||
--with-gss=%{_prefix} \
|
--with-gss=%{_prefix} \
|
||||||
--with-curses=%{_prefix} \
|
--with-curses=%{_prefix} \
|
||||||
--enable-smtp \
|
--enable-smtp \
|
||||||
--enable-lua \
|
--enable-hcache \
|
||||||
--enable-nntp \
|
--with-regex \
|
||||||
|
%if 0%{?suse_version} > 1315
|
||||||
|
--with-idn2
|
||||||
|
%else
|
||||||
--with-idn
|
--with-idn
|
||||||
|
%endif
|
||||||
make -C doc clean
|
make -C doc clean
|
||||||
make
|
make
|
||||||
make -C doc
|
make -C doc
|
||||||
@ -269,7 +267,6 @@ install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.muttrc
|
|||||||
install -D -m 644 %{SOURCE9} %{buildroot}%{_datadir}/%name/mailcap
|
install -D -m 644 %{SOURCE9} %{buildroot}%{_datadir}/%name/mailcap
|
||||||
rm -vf %{buildroot}%{_docdir}/%name/manual.txt
|
rm -vf %{buildroot}%{_docdir}/%name/manual.txt
|
||||||
install -D -m 644 doc/manual.txt.gz %{buildroot}%{_docdir}/%name/
|
install -D -m 644 doc/manual.txt.gz %{buildroot}%{_docdir}/%name/
|
||||||
chmod a-x %{buildroot}%{_docdir}/%name/keybase/*.sh
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
%suse_update_desktop_file mutt
|
%suse_update_desktop_file mutt
|
||||||
%endif
|
%endif
|
||||||
@ -307,34 +304,22 @@ chmod a-x %{buildroot}%{_docdir}/%name/keybase/*.sh
|
|||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc %{_docdir}/%name/COPYRIGHT
|
%doc %{_docdir}/%name/COPYRIGHT
|
||||||
|
%doc %{_docdir}/%name/ChangeLog
|
||||||
|
%doc %{_docdir}/%name/GPL
|
||||||
|
%doc %{_docdir}/%name/NEWS
|
||||||
%doc %{_docdir}/%name/README*
|
%doc %{_docdir}/%name/README*
|
||||||
%doc %{_docdir}/%name/ChangeLog.md
|
%doc %{_docdir}/%name/TODO
|
||||||
%doc %{_docdir}/%name/CODE_OF_CONDUCT.md
|
|
||||||
%doc %{_docdir}/%name/LICENSE.md
|
|
||||||
%doc %{_docdir}/%name/*.html
|
%doc %{_docdir}/%name/*.html
|
||||||
%doc %{_docdir}/%name/*.txt
|
%doc %{_docdir}/%name/*.txt
|
||||||
%dir %doc %{_docdir}/%name/colorschemes/
|
|
||||||
%doc %{_docdir}/%name/colorschemes/*.muttrc
|
|
||||||
%doc %{_docdir}/%name/colorschemes/vombatidae.mutt
|
|
||||||
%dir %doc %{_docdir}/%name/keybase/
|
|
||||||
%doc %{_docdir}/%name/keybase/*
|
|
||||||
%dir %doc %{_docdir}/%name/logo/
|
|
||||||
%doc %{_docdir}/%name/logo/mutt*
|
|
||||||
%doc %{_docdir}/%name/neomutt-syntax.vim
|
|
||||||
%dir %doc %{_docdir}/%name/samples/
|
%dir %doc %{_docdir}/%name/samples/
|
||||||
%doc %{_docdir}/%name/samples/*.rc
|
%doc %{_docdir}/%name/samples/*.rc
|
||||||
|
%doc %{_docdir}/%name/samples/ca-bundle.crt
|
||||||
%doc %{_docdir}/%name/samples/colors.*
|
%doc %{_docdir}/%name/samples/colors.*
|
||||||
|
%doc %{_docdir}/%name/samples/mutt_xtitle
|
||||||
%doc %{_docdir}/%name/samples/sample.*
|
%doc %{_docdir}/%name/samples/sample.*
|
||||||
%doc %{_docdir}/%name/samples/smime_keys_test.pl
|
%doc %{_docdir}/%name/samples/smime_keys_test.pl
|
||||||
%dir %doc %{_docdir}/%name/vim-keys/
|
%dir %doc %{_docdir}/%name/samples/iconv/
|
||||||
%doc %{_docdir}/%name/vim-keys/*
|
%doc %{_docdir}/%name/samples/iconv/*.rc
|
||||||
%dir %doc %{_docdir}/%name/hcache-bench/
|
|
||||||
%doc %{_docdir}/%name/hcache-bench/README.md
|
|
||||||
%doc %{_docdir}/%name/hcache-bench/muttrc
|
|
||||||
%doc %{_docdir}/%name/hcache-bench/neomutt-hcache-bench.sh
|
|
||||||
%dir %doc %{_docdir}/%name/lua/
|
|
||||||
%doc %{_docdir}/%name/lua/test_lua-api_runner.muttrc
|
|
||||||
%doc %{_docdir}/%name/lua/test_lua-api_spec.lua
|
|
||||||
|
|
||||||
%files lang -f %name.lang
|
%files lang -f %name.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:9f0d128fe8dbbbddb67e2b629f8b5e52a9d892f82c735845c1708c14e3046657
|
|
||||||
size 2533245
|
|
@ -1,103 +0,0 @@
|
|||||||
From c030a8b8ef43f2bc549e4f00651c25681d54f26e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Richard Russon <rich@flatcap.org>
|
|
||||||
Date: Thu, 14 Sep 2017 17:36:19 +0100
|
|
||||||
Subject: [PATCH] fix: %{fmt} date format
|
|
||||||
|
|
||||||
A mistake was introduced when moving the date code to the library.
|
|
||||||
The dates being displayed were those of the base timezone, not the email.
|
|
||||||
|
|
||||||
Remove the `%<...>` documentation from `$index_format`
|
|
||||||
|
|
||||||
Fixes #757
|
|
||||||
---
|
|
||||||
init.h | 2 --
|
|
||||||
lib/date.c | 12 ++++++++----
|
|
||||||
lib/date.h | 2 +-
|
|
||||||
parse.c | 10 +++++-----
|
|
||||||
4 files changed, 14 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/init.h b/init.h
|
|
||||||
index 247b0f211..4f029f39c 100644
|
|
||||||
--- a/init.h
|
|
||||||
+++ b/init.h
|
|
||||||
@@ -1584,8 +1584,6 @@ struct Option MuttVars[] = {
|
|
||||||
** .dt %(fmt) .dd the local date and time when the message was received.
|
|
||||||
** ``fmt'' is expanded by the library function \fCstrftime(3)\fP;
|
|
||||||
** a leading bang disables locales
|
|
||||||
- ** .dt %<fmt> .dd the current local time. ``fmt'' is expanded by the library
|
|
||||||
- ** function \fCstrftime(3)\fP; a leading bang disables locales.
|
|
||||||
** .dt %>X .dd right justify the rest of the string and pad with character ``X''
|
|
||||||
** .dt %|X .dd pad to the end of the line with character ``X''
|
|
||||||
** .dt %*X .dd soft-fill with character ``X'' as pad
|
|
||||||
diff --git a/lib/date.c b/lib/date.c
|
|
||||||
index b1a450a24..5cce4b3f9 100644
|
|
||||||
--- a/lib/date.c
|
|
||||||
+++ b/lib/date.c
|
|
||||||
@@ -432,7 +432,7 @@ bool is_day_name(const char *s)
|
|
||||||
*
|
|
||||||
* The 'timezone' field is optional; it defaults to +0000 if missing.
|
|
||||||
*/
|
|
||||||
-time_t mutt_parse_date(const char *s, const struct Tz **tz_out)
|
|
||||||
+time_t mutt_parse_date(const char *s, struct Tz *tz_out)
|
|
||||||
{
|
|
||||||
int count = 0;
|
|
||||||
char *t = NULL;
|
|
||||||
@@ -537,9 +537,6 @@ time_t mutt_parse_date(const char *s, const struct Tz **tz_out)
|
|
||||||
zhours = tz->zhours;
|
|
||||||
zminutes = tz->zminutes;
|
|
||||||
zoccident = tz->zoccident;
|
|
||||||
-
|
|
||||||
- if (tz_out)
|
|
||||||
- *tz_out = tz;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ad hoc support for the European MET (now officially CET) TZ */
|
|
||||||
@@ -568,5 +565,12 @@ time_t mutt_parse_date(const char *s, const struct Tz **tz_out)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (tz_out)
|
|
||||||
+ {
|
|
||||||
+ tz_out->zhours = zhours;
|
|
||||||
+ tz_out->zminutes = zminutes;
|
|
||||||
+ tz_out->zoccident = zoccident;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return (mutt_mktime(&tm, 0) + tz_offset);
|
|
||||||
}
|
|
||||||
diff --git a/lib/date.h b/lib/date.h
|
|
||||||
index ad0eb9c38..fab7a1b8f 100644
|
|
||||||
--- a/lib/date.h
|
|
||||||
+++ b/lib/date.h
|
|
||||||
@@ -45,7 +45,7 @@ time_t mutt_local_tz(time_t t);
|
|
||||||
time_t mutt_mktime(struct tm *t, int local);
|
|
||||||
void mutt_normalize_time(struct tm *tm);
|
|
||||||
char *mutt_make_date(char *buf, size_t buflen);
|
|
||||||
-time_t mutt_parse_date(const char *s, const struct Tz **tz_out);
|
|
||||||
+time_t mutt_parse_date(const char *s, struct Tz *tz_out);
|
|
||||||
bool is_day_name(const char *s);
|
|
||||||
int mutt_check_month(const char *s);
|
|
||||||
|
|
||||||
diff --git a/parse.c b/parse.c
|
|
||||||
index 38f46129d..3b8966e1a 100644
|
|
||||||
--- a/parse.c
|
|
||||||
+++ b/parse.c
|
|
||||||
@@ -835,13 +835,13 @@ int mutt_parse_rfc822_line(struct Envelope *e, struct Header *hdr, char *line,
|
|
||||||
mutt_str_replace(&e->date, p);
|
|
||||||
if (hdr)
|
|
||||||
{
|
|
||||||
- const struct Tz *tz = NULL;
|
|
||||||
+ struct Tz tz;
|
|
||||||
hdr->date_sent = mutt_parse_date(p, &tz);
|
|
||||||
- if (tz)
|
|
||||||
+ if (hdr->date_sent > 0)
|
|
||||||
{
|
|
||||||
- hdr->zhours = tz->zhours;
|
|
||||||
- hdr->zminutes = tz->zminutes;
|
|
||||||
- hdr->zoccident = tz->zoccident;
|
|
||||||
+ hdr->zhours = tz.zhours;
|
|
||||||
+ hdr->zminutes = tz.zminutes;
|
|
||||||
+ hdr->zoccident = tz.zoccident;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
matched = 1;
|
|
@ -1,12 +1,12 @@
|
|||||||
---
|
---
|
||||||
globals.h | 2 ++
|
globals.h | 2 ++
|
||||||
init.h | 12 ++++++++++++
|
init.h | 15 ++++++++++++---
|
||||||
ncrypt/pgp.c | 3 ++-
|
pgp.c | 3 ++-
|
||||||
3 files changed, 16 insertions(+), 1 deletion(-)
|
3 files changed, 16 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
--- globals.h
|
--- globals.h
|
||||||
+++ globals.h 2017-09-11 12:01:55.090752808 +0000
|
+++ globals.h 2018-07-04 13:31:23.664299582 +0000
|
||||||
@@ -292,6 +292,8 @@ WHERE struct Regex PgpDecryptionOkay;
|
@@ -256,6 +256,8 @@ WHERE char *PgpDefaultKey;
|
||||||
WHERE char *PgpSignAs;
|
WHERE char *PgpSignAs;
|
||||||
WHERE short PgpTimeout;
|
WHERE short PgpTimeout;
|
||||||
WHERE char *PgpEntryFormat;
|
WHERE char *PgpEntryFormat;
|
||||||
@ -16,35 +16,38 @@
|
|||||||
WHERE char *PgpDecodeCommand;
|
WHERE char *PgpDecodeCommand;
|
||||||
WHERE char *PgpVerifyCommand;
|
WHERE char *PgpVerifyCommand;
|
||||||
--- init.h
|
--- init.h
|
||||||
+++ init.h 2017-09-11 12:03:41.660816163 +0000
|
+++ init.h 2018-07-04 13:34:46.696603852 +0000
|
||||||
@@ -3466,6 +3466,18 @@ struct Option MuttVars[] = {
|
@@ -3090,9 +3090,18 @@ struct option_t MuttVars[] = {
|
||||||
** a line quoted text if it also matches $$smileys. This mostly
|
** a line quoted text if it also matches $$smileys. This mostly
|
||||||
** happens at the beginning of a line.
|
** happens at the beginning of a line.
|
||||||
*/
|
*/
|
||||||
+ { "pgp_mime_signature_filename", DT_STRING, R_NONE, UL &PgpMimeSignatureFilename, UL "signature.asc"},
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
+ { "pgp_mime_signature_filename", DT_STR, R_NONE, UL &PgpMimeSignatureFilename, UL "signature.asc"},
|
||||||
+ /*
|
+ /*
|
||||||
+ ** .pp
|
+ ** .pp
|
||||||
+ ** This option sets the filename used for signature parts in PGP/MIME
|
+ ** This option sets the filename used for signature parts in PGP/MIME
|
||||||
+ ** signed messages.
|
+ ** signed messages.
|
||||||
+ */
|
+ */
|
||||||
+ { "pgp_mime_signature_description", DT_STRING, R_NONE, UL &PgpMimeSignatureDescription, UL "Digital signature"},
|
+ { "pgp_mime_signature_description", DT_STR, R_NONE, UL &PgpMimeSignatureDescription, UL "Digital signature"},
|
||||||
+ /*
|
+ /*
|
||||||
+ ** .pp
|
+ ** .pp
|
||||||
+ ** This option sets the Content-Description used for signature parts in
|
+ ** This option sets the Content-Description used for signature parts in
|
||||||
+ ** PGP/MIME signed messages.
|
+ ** PGP/MIME signed messages.
|
||||||
+ */
|
+ */
|
||||||
{ "smime_ask_cert_label", DT_BOOL, R_NONE, OPT_SMIME_ASK_CERT_LABEL, 1 },
|
{ "smime_ask_cert_label", DT_BOOL, R_NONE, OPTASKCERTLABEL, 1 },
|
||||||
/*
|
/*
|
||||||
** .pp
|
** .pp
|
||||||
--- ncrypt/pgp.c
|
--- pgp.c
|
||||||
+++ ncrypt/pgp.c 2017-09-11 12:01:55.090752808 +0000
|
+++ pgp.c 2018-07-04 13:37:32.013594333 +0000
|
||||||
@@ -1208,7 +1208,8 @@ struct Body *pgp_sign_message(struct Bod
|
@@ -1201,7 +1201,8 @@ BODY *pgp_sign_message (BODY *a)
|
||||||
t->disposition = DISPNONE;
|
t->disposition = DISPNONE;
|
||||||
t->encoding = ENC7BIT;
|
t->encoding = ENC7BIT;
|
||||||
t->unlink = true; /* ok to remove this file after sending. */
|
t->unlink = 1; /* ok to remove this file after sending. */
|
||||||
- mutt_set_parameter("name", "signature.asc", &t->parameter);
|
- mutt_set_parameter ("name", "signature.asc", &t->parameter);
|
||||||
+ mutt_set_parameter ("name", PgpMimeSignatureFilename, &t->parameter);
|
+ mutt_set_parameter ("name", PgpMimeSignatureFilename, &t->parameter);
|
||||||
+ t->description = safe_strdup (PgpMimeSignatureDescription);
|
+ t->description = safe_strdup (PgpMimeSignatureDescription);
|
||||||
|
|
||||||
return a;
|
return (a);
|
||||||
}
|
}
|
||||||
|
393
truncate.patch
Normal file
393
truncate.patch
Normal file
@ -0,0 +1,393 @@
|
|||||||
|
---
|
||||||
|
bcache.c | 2 +-
|
||||||
|
browser.c | 6 +++---
|
||||||
|
buffy.c | 4 ++--
|
||||||
|
commands.c | 2 +-
|
||||||
|
imap/browse.c | 2 +-
|
||||||
|
imap/imap.c | 18 +++++++++---------
|
||||||
|
imap/imap_private.h | 2 +-
|
||||||
|
imap/message.c | 2 +-
|
||||||
|
lib.c | 2 +-
|
||||||
|
lib.h | 2 +-
|
||||||
|
mh.c | 23 +++++++++++++----------
|
||||||
|
mutt_sasl.c | 2 +-
|
||||||
|
mutt_ssl_gnutls.c | 18 +++++++++---------
|
||||||
|
pager.c | 2 +-
|
||||||
|
pgppubring.c | 2 +-
|
||||||
|
smime.c | 2 +-
|
||||||
|
sort.c | 2 +-
|
||||||
|
17 files changed, 48 insertions(+), 45 deletions(-)
|
||||||
|
|
||||||
|
--- bcache.c
|
||||||
|
+++ bcache.c 2018-07-05 09:40:49.868105180 +0000
|
||||||
|
@@ -128,7 +128,7 @@ FILE* mutt_bcache_get(body_cache_t *bcac
|
||||||
|
|
||||||
|
FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp)
|
||||||
|
{
|
||||||
|
- char path[_POSIX_PATH_MAX];
|
||||||
|
+ char path[_POSIX_PATH_MAX+64];
|
||||||
|
FILE* fp;
|
||||||
|
char* s;
|
||||||
|
struct stat sb;
|
||||||
|
--- browser.c
|
||||||
|
+++ browser.c 2018-07-05 09:56:19.671284149 +0000
|
||||||
|
@@ -502,7 +502,7 @@ static int examine_directory (MUTTMENU *
|
||||||
|
static int examine_mailboxes (MUTTMENU *menu, struct browser_state *state)
|
||||||
|
{
|
||||||
|
struct stat s;
|
||||||
|
- char buffer[LONG_STRING];
|
||||||
|
+ char buffer[LONG_STRING+16];
|
||||||
|
BUFFY *tmp = Incoming;
|
||||||
|
|
||||||
|
if (!Incoming)
|
||||||
|
@@ -548,7 +548,7 @@ static int examine_mailboxes (MUTTMENU *
|
||||||
|
if (mx_is_maildir (tmp->path))
|
||||||
|
{
|
||||||
|
struct stat st2;
|
||||||
|
- char md[_POSIX_PATH_MAX];
|
||||||
|
+ char md[_POSIX_PATH_MAX+16];
|
||||||
|
|
||||||
|
snprintf (md, sizeof (md), "%s/new", tmp->path);
|
||||||
|
if (stat (md, &s) < 0)
|
||||||
|
@@ -635,7 +635,7 @@ static int file_tag (MUTTMENU *menu, int
|
||||||
|
|
||||||
|
void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *numfiles)
|
||||||
|
{
|
||||||
|
- char buf[_POSIX_PATH_MAX];
|
||||||
|
+ char buf[_POSIX_PATH_MAX+16];
|
||||||
|
char prefix[_POSIX_PATH_MAX] = "";
|
||||||
|
char helpstr[LONG_STRING];
|
||||||
|
char title[STRING];
|
||||||
|
--- buffy.c
|
||||||
|
+++ buffy.c 2018-07-05 09:57:26.138080458 +0000
|
||||||
|
@@ -313,8 +313,8 @@ int mutt_parse_mailboxes (BUFFER *path,
|
||||||
|
static int buffy_maildir_check_dir (BUFFY* mailbox, const char *dir_name, int check_new,
|
||||||
|
int check_stats)
|
||||||
|
{
|
||||||
|
- char path[_POSIX_PATH_MAX];
|
||||||
|
- char msgpath[_POSIX_PATH_MAX];
|
||||||
|
+ char path[2*_POSIX_PATH_MAX+8];
|
||||||
|
+ char msgpath[2*_POSIX_PATH_MAX+8];
|
||||||
|
DIR *dirp;
|
||||||
|
struct dirent *de;
|
||||||
|
char *p;
|
||||||
|
--- commands.c
|
||||||
|
+++ commands.c 2018-07-05 09:58:25.501005161 +0000
|
||||||
|
@@ -241,7 +241,7 @@ int mutt_display_message (HEADER *cur)
|
||||||
|
|
||||||
|
void ci_bounce_message (HEADER *h)
|
||||||
|
{
|
||||||
|
- char prompt[SHORT_STRING];
|
||||||
|
+ char prompt[SHORT_STRING+16];
|
||||||
|
char scratch[SHORT_STRING];
|
||||||
|
char buf[HUGE_STRING] = { 0 };
|
||||||
|
ADDRESS *adr = NULL;
|
||||||
|
--- lib.c
|
||||||
|
+++ lib.c 2018-07-05 09:39:44.941278448 +0000
|
||||||
|
@@ -583,7 +583,7 @@ int mutt_rmtree (const char* path)
|
||||||
|
{
|
||||||
|
DIR* dirp;
|
||||||
|
struct dirent* de;
|
||||||
|
- char cur[_POSIX_PATH_MAX];
|
||||||
|
+ char cur[2*_POSIX_PATH_MAX+16];
|
||||||
|
struct stat statbuf;
|
||||||
|
int rc = 0;
|
||||||
|
|
||||||
|
--- lib.h
|
||||||
|
+++ lib.h 2018-07-05 09:45:16.751280528 +0000
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
|
||||||
|
# define HUGE_STRING 8192
|
||||||
|
# define LONG_STRING 1024
|
||||||
|
-# define STRING 256
|
||||||
|
+# define STRING 512
|
||||||
|
# define SHORT_STRING 128
|
||||||
|
|
||||||
|
/*
|
||||||
|
--- mh.c
|
||||||
|
+++ mh.c 2018-07-05 09:59:27.119888461 +0000
|
||||||
|
@@ -852,7 +852,7 @@ static int maildir_parse_dir (CONTEXT *
|
||||||
|
|
||||||
|
if (subdir)
|
||||||
|
{
|
||||||
|
- char tmp[_POSIX_PATH_MAX];
|
||||||
|
+ char tmp[2*_POSIX_PATH_MAX+16];
|
||||||
|
snprintf (tmp, sizeof (tmp), "%s/%s", subdir, de->d_name);
|
||||||
|
h->path = safe_strdup (tmp);
|
||||||
|
}
|
||||||
|
@@ -1406,7 +1406,7 @@ static void maildir_flags (char *dest, s
|
||||||
|
|
||||||
|
if (hdr && (hdr->flagged || hdr->replied || hdr->read || hdr->deleted || hdr->old || hdr->maildir_flags))
|
||||||
|
{
|
||||||
|
- char tmp[LONG_STRING];
|
||||||
|
+ char tmp[LONG_STRING], *ptr;
|
||||||
|
snprintf (tmp, sizeof (tmp),
|
||||||
|
"%s%s%s%s%s",
|
||||||
|
hdr->flagged ? "F" : "",
|
||||||
|
@@ -1415,7 +1415,10 @@ static void maildir_flags (char *dest, s
|
||||||
|
NONULL(hdr->maildir_flags));
|
||||||
|
if (hdr->maildir_flags)
|
||||||
|
qsort (tmp, strlen (tmp), 1, ch_compar);
|
||||||
|
- snprintf (dest, destlen, ":2,%s", tmp);
|
||||||
|
+ /* snprintf (dest, destlen, ":2,%s", tmp); */
|
||||||
|
+ strcpy(dest, ":2,");
|
||||||
|
+ ptr = stpncpy(dest+3, tmp, destlen-3);
|
||||||
|
+ *ptr = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1561,7 +1564,7 @@ static int _maildir_commit_message (CONT
|
||||||
|
char subdir[4];
|
||||||
|
char suffix[16];
|
||||||
|
char path[_POSIX_PATH_MAX];
|
||||||
|
- char full[_POSIX_PATH_MAX];
|
||||||
|
+ char full[2*_POSIX_PATH_MAX+16];
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
if (safe_fsync_close (&msg->fp))
|
||||||
|
@@ -1586,7 +1589,7 @@ static int _maildir_commit_message (CONT
|
||||||
|
snprintf (path, _POSIX_PATH_MAX, "%s/%lld.%u_%d.%s%s", subdir,
|
||||||
|
(long long)time (NULL), (unsigned int)getpid (), Counter++,
|
||||||
|
NONULL (Hostname), suffix);
|
||||||
|
- snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
|
||||||
|
+ snprintf (full, sizeof(full), "%s/%s", ctx->path, path);
|
||||||
|
|
||||||
|
dprint (2, (debugfile, "_maildir_commit_message (): renaming %s to %s.\n",
|
||||||
|
msg->path, full));
|
||||||
|
@@ -1825,9 +1828,9 @@ static int maildir_sync_message (CONTEXT
|
||||||
|
/* we just have to rename the file. */
|
||||||
|
|
||||||
|
char newpath[_POSIX_PATH_MAX];
|
||||||
|
- char partpath[_POSIX_PATH_MAX];
|
||||||
|
- char fullpath[_POSIX_PATH_MAX];
|
||||||
|
- char oldpath[_POSIX_PATH_MAX];
|
||||||
|
+ char partpath[_POSIX_PATH_MAX+64];
|
||||||
|
+ char fullpath[2*_POSIX_PATH_MAX+16];
|
||||||
|
+ char oldpath[2*_POSIX_PATH_MAX+16];
|
||||||
|
char suffix[16];
|
||||||
|
char *p;
|
||||||
|
|
||||||
|
@@ -2371,9 +2374,9 @@ static int mh_check_mailbox (CONTEXT * c
|
||||||
|
static FILE *_maildir_open_find_message (const char *folder, const char *unique,
|
||||||
|
const char *subfolder)
|
||||||
|
{
|
||||||
|
- char dir[_POSIX_PATH_MAX];
|
||||||
|
+ char dir[2*_POSIX_PATH_MAX+16];
|
||||||
|
char tunique[_POSIX_PATH_MAX];
|
||||||
|
- char fname[_POSIX_PATH_MAX];
|
||||||
|
+ char fname[3*_POSIX_PATH_MAX];
|
||||||
|
|
||||||
|
DIR *dp;
|
||||||
|
struct dirent *de;
|
||||||
|
--- mutt_sasl.c
|
||||||
|
+++ mutt_sasl.c 2018-07-05 10:12:19.509881363 +0000
|
||||||
|
@@ -80,7 +80,7 @@ static int getnameinfo_err(int ret)
|
||||||
|
* a protection buffer. */
|
||||||
|
#define MUTT_SASL_MAXBUF 65536
|
||||||
|
|
||||||
|
-#define IP_PORT_BUFLEN 1024
|
||||||
|
+#define IP_PORT_BUFLEN (NI_MAXHOST+NI_MAXSERV+8)
|
||||||
|
|
||||||
|
static sasl_callback_t mutt_sasl_callbacks[5];
|
||||||
|
|
||||||
|
--- mutt_ssl_gnutls.c
|
||||||
|
+++ mutt_ssl_gnutls.c 2018-07-05 09:46:09.406328292 +0000
|
||||||
|
@@ -862,7 +862,7 @@ static int tls_check_one_certificate (co
|
||||||
|
menu->max = 25;
|
||||||
|
menu->dialog = (char **) safe_calloc (1, menu->max * sizeof (char *));
|
||||||
|
for (i = 0; i < menu->max; i++)
|
||||||
|
- menu->dialog[i] = (char *) safe_calloc (1, SHORT_STRING * sizeof (char));
|
||||||
|
+ menu->dialog[i] = (char *) safe_calloc (1, STRING * sizeof (char));
|
||||||
|
mutt_push_current_menu (menu);
|
||||||
|
|
||||||
|
row = 0;
|
||||||
|
@@ -898,10 +898,10 @@ static int tls_check_one_certificate (co
|
||||||
|
dn_country, &buflen) != 0)
|
||||||
|
dn_country[0] = '\0';
|
||||||
|
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email);
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organizational_unit);
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s %s",
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s %s", dn_common_name, dn_email);
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s", dn_organization);
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s", dn_organizational_unit);
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s %s %s",
|
||||||
|
dn_locality, dn_province, dn_country);
|
||||||
|
row++;
|
||||||
|
|
||||||
|
@@ -937,10 +937,10 @@ static int tls_check_one_certificate (co
|
||||||
|
dn_country, &buflen) != 0)
|
||||||
|
dn_country[0] = '\0';
|
||||||
|
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email);
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organizational_unit);
|
||||||
|
- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s %s",
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s %s", dn_common_name, dn_email);
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s", dn_organization);
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s", dn_organizational_unit);
|
||||||
|
+ snprintf (menu->dialog[row++], STRING, " %s %s %s",
|
||||||
|
dn_locality, dn_province, dn_country);
|
||||||
|
row++;
|
||||||
|
|
||||||
|
--- pager.c
|
||||||
|
+++ pager.c 2018-07-05 09:39:09.533918201 +0000
|
||||||
|
@@ -1911,7 +1911,7 @@ mutt_pager (const char *banner, const ch
|
||||||
|
{
|
||||||
|
static char searchbuf[STRING] = "";
|
||||||
|
char buffer[LONG_STRING];
|
||||||
|
- char helpstr[SHORT_STRING*2];
|
||||||
|
+ char helpstr[LONG_STRING+SHORT_STRING*2+16];
|
||||||
|
char tmphelp[SHORT_STRING*2];
|
||||||
|
int i, ch = 0, rc = -1;
|
||||||
|
int err, first = 1;
|
||||||
|
--- pgppubring.c
|
||||||
|
+++ pgppubring.c 2018-07-05 09:46:56.341479401 +0000
|
||||||
|
@@ -86,7 +86,7 @@ int main (int argc, char * const argv[])
|
||||||
|
char *env_pgppath, *env_home;
|
||||||
|
|
||||||
|
char pgppath[_POSIX_PATH_MAX];
|
||||||
|
- char kring[_POSIX_PATH_MAX];
|
||||||
|
+ char kring[_POSIX_PATH_MAX+64];
|
||||||
|
|
||||||
|
while ((c = getopt (argc, argv, "f25sk:S")) != EOF)
|
||||||
|
{
|
||||||
|
--- smime.c
|
||||||
|
+++ smime.c 2018-07-05 10:05:15.813567054 +0000
|
||||||
|
@@ -179,7 +179,7 @@ static const char *_mutt_fmt_smime_comma
|
||||||
|
if (!optional)
|
||||||
|
{
|
||||||
|
char path[_POSIX_PATH_MAX];
|
||||||
|
- char buf1[LONG_STRING], buf2[LONG_STRING];
|
||||||
|
+ char buf1[LONG_STRING], buf2[LONG_STRING+16];
|
||||||
|
struct stat sb;
|
||||||
|
|
||||||
|
strfcpy (path, NONULL (SmimeCALocation), sizeof (path));
|
||||||
|
--- sort.c
|
||||||
|
+++ sort.c 2018-07-05 10:17:55.819779642 +0000
|
||||||
|
@@ -40,7 +40,7 @@ static sort_t *AuxSort = NULL;
|
||||||
|
unset_option(OPTAUXSORT); \
|
||||||
|
} \
|
||||||
|
if (!code) \
|
||||||
|
- code = (*((HEADER **)a))->index - (*((HEADER **)b))->index;
|
||||||
|
+ code = (*((HEADER **)a))->index - (*((HEADER **)b))->index
|
||||||
|
|
||||||
|
static int compare_score (const void *a, const void *b)
|
||||||
|
{
|
||||||
|
--- imap/browse.c
|
||||||
|
+++ imap/browse.c 2018-07-05 09:01:55.262536511 +0000
|
||||||
|
@@ -43,7 +43,7 @@ int imap_browse (char* path, struct brow
|
||||||
|
{
|
||||||
|
IMAP_DATA* idata;
|
||||||
|
IMAP_LIST list;
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+64];
|
||||||
|
char mbox[LONG_STRING];
|
||||||
|
char munged_mbox[LONG_STRING];
|
||||||
|
char list_cmd[5];
|
||||||
|
--- imap/imap.c
|
||||||
|
+++ imap/imap.c 2018-07-05 09:55:39.184017284 +0000
|
||||||
|
@@ -59,7 +59,7 @@ int imap_access (const char* path)
|
||||||
|
{
|
||||||
|
IMAP_DATA* idata;
|
||||||
|
IMAP_MBOX mx;
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+64];
|
||||||
|
char mailbox[LONG_STRING];
|
||||||
|
char mbox[LONG_STRING];
|
||||||
|
int rc;
|
||||||
|
@@ -115,7 +115,7 @@ int imap_access (const char* path)
|
||||||
|
|
||||||
|
int imap_create_mailbox (IMAP_DATA* idata, char* mailbox)
|
||||||
|
{
|
||||||
|
- char buf[LONG_STRING], mbox[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+16], mbox[LONG_STRING];
|
||||||
|
|
||||||
|
imap_munge_mbox_name (idata, mbox, sizeof (mbox), mailbox);
|
||||||
|
snprintf (buf, sizeof (buf), "CREATE %s", mbox);
|
||||||
|
@@ -133,7 +133,7 @@ int imap_rename_mailbox (IMAP_DATA* idat
|
||||||
|
{
|
||||||
|
char oldmbox[LONG_STRING];
|
||||||
|
char newmbox[LONG_STRING];
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[2*LONG_STRING+64];
|
||||||
|
|
||||||
|
imap_munge_mbox_name (idata, oldmbox, sizeof (oldmbox), mx->mbox);
|
||||||
|
imap_munge_mbox_name (idata, newmbox, sizeof (newmbox), newname);
|
||||||
|
@@ -148,7 +148,7 @@ int imap_rename_mailbox (IMAP_DATA* idat
|
||||||
|
|
||||||
|
int imap_delete_mailbox (CONTEXT* ctx, IMAP_MBOX mx)
|
||||||
|
{
|
||||||
|
- char buf[LONG_STRING], mbox[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+16], mbox[LONG_STRING];
|
||||||
|
IMAP_DATA *idata;
|
||||||
|
|
||||||
|
if (!ctx || !ctx->data) {
|
||||||
|
@@ -588,7 +588,7 @@ static int imap_open_mailbox (CONTEXT* c
|
||||||
|
IMAP_DATA *idata;
|
||||||
|
IMAP_STATUS* status;
|
||||||
|
char buf[LONG_STRING];
|
||||||
|
- char bufout[LONG_STRING];
|
||||||
|
+ char bufout[LONG_STRING+64];
|
||||||
|
int count = 0;
|
||||||
|
IMAP_MBOX mx, pmx;
|
||||||
|
int rc;
|
||||||
|
@@ -1572,7 +1572,7 @@ int imap_buffy_check (int force, int che
|
||||||
|
IMAP_DATA* lastdata = NULL;
|
||||||
|
BUFFY* mailbox;
|
||||||
|
char name[LONG_STRING];
|
||||||
|
- char command[LONG_STRING];
|
||||||
|
+ char command[LONG_STRING+64];
|
||||||
|
char munged[LONG_STRING];
|
||||||
|
int buffies = 0;
|
||||||
|
|
||||||
|
@@ -1663,7 +1663,7 @@ int imap_status (char* path, int queue)
|
||||||
|
static int queued = 0;
|
||||||
|
|
||||||
|
IMAP_DATA *idata;
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+64];
|
||||||
|
char mbox[LONG_STRING];
|
||||||
|
IMAP_STATUS* status;
|
||||||
|
|
||||||
|
@@ -1927,7 +1927,7 @@ int imap_search (CONTEXT* ctx, const pat
|
||||||
|
int imap_subscribe (char *path, int subscribe)
|
||||||
|
{
|
||||||
|
IMAP_DATA *idata;
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+64];
|
||||||
|
char mbox[LONG_STRING];
|
||||||
|
char errstr[STRING];
|
||||||
|
BUFFER err, token;
|
||||||
|
@@ -2054,7 +2054,7 @@ imap_complete_hosts (char *dest, size_t
|
||||||
|
int imap_complete(char* dest, size_t dlen, char* path) {
|
||||||
|
IMAP_DATA* idata;
|
||||||
|
char list[LONG_STRING];
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+64];
|
||||||
|
IMAP_LIST listresp;
|
||||||
|
char completion[LONG_STRING];
|
||||||
|
int clen;
|
||||||
|
--- imap/imap_private.h
|
||||||
|
+++ imap/imap_private.h 2018-07-05 09:15:32.671687730 +0000
|
||||||
|
@@ -73,7 +73,7 @@
|
||||||
|
#define IMAP_CMD_POLL (1<<3)
|
||||||
|
|
||||||
|
/* length of "DD-MMM-YYYY HH:MM:SS +ZZzz" (null-terminated) */
|
||||||
|
-#define IMAP_DATELEN 27
|
||||||
|
+#define IMAP_DATELEN 37
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
--- imap/message.c
|
||||||
|
+++ imap/message.c 2018-07-05 09:11:45.191822795 +0000
|
||||||
|
@@ -753,7 +753,7 @@ int imap_append_message (CONTEXT *ctx, M
|
||||||
|
{
|
||||||
|
IMAP_DATA* idata;
|
||||||
|
FILE *fp;
|
||||||
|
- char buf[LONG_STRING];
|
||||||
|
+ char buf[LONG_STRING+IMAP_DATELEN+SHORT_STRING+64];
|
||||||
|
char mbox[LONG_STRING];
|
||||||
|
char mailbox[LONG_STRING];
|
||||||
|
char internaldate[IMAP_DATELEN];
|
@ -1,52 +1,53 @@
|
|||||||
---
|
---
|
||||||
handler.c | 10 ++++++----
|
handler.c | 11 ++++++-----
|
||||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
--- handler.c
|
--- handler.c
|
||||||
+++ handler.c 2017-09-11 12:06:12.982065389 +0000
|
+++ handler.c 2018-07-04 13:48:57.285110213 +0000
|
||||||
@@ -821,6 +821,7 @@ static int text_enriched_handler(struct
|
@@ -780,7 +780,7 @@ static void enriched_set_flags (const wc
|
||||||
enum
|
static int text_enriched_handler (BODY *a, STATE *s)
|
||||||
{
|
{
|
||||||
TEXT,
|
enum {
|
||||||
+ TEXT_GOTWC,
|
- TEXT, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
|
||||||
LANGLE,
|
+ TEXT, TEXT_GOTWC, LANGLE, TAG, BOGUS_TAG, NEWLINE, ST_EOF, DONE
|
||||||
TAG,
|
} state = TEXT;
|
||||||
BOGUS_TAG,
|
|
||||||
@@ -858,7 +859,7 @@ static int text_enriched_handler(struct
|
long bytes = a->length;
|
||||||
|
@@ -810,7 +810,7 @@ static int text_enriched_handler (BODY *
|
||||||
{
|
{
|
||||||
if (state != ST_EOF)
|
if (state != ST_EOF)
|
||||||
{
|
{
|
||||||
- if (!bytes || (wc = fgetwc(s->fpin)) == WEOF)
|
- if (!bytes || (wc = fgetwc (s->fpin)) == WEOF)
|
||||||
+ if (state != TEXT_GOTWC && (!bytes || (fscanf (s->fpin, "%lc", &wc)) == EOF))
|
+ if (state != TEXT_GOTWC && (!bytes || (wc = fgetwc (s->fpin)) == WEOF))
|
||||||
state = ST_EOF;
|
state = ST_EOF;
|
||||||
else
|
else
|
||||||
bytes--;
|
bytes--;
|
||||||
@@ -866,6 +867,8 @@ static int text_enriched_handler(struct
|
@@ -818,6 +818,8 @@ static int text_enriched_handler (BODY *
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
+ case TEXT_GOTWC:
|
+ case TEXT_GOTWC:
|
||||||
+ state = TEXT;
|
+ state = TEXT;
|
||||||
case TEXT:
|
case TEXT :
|
||||||
switch (wc)
|
switch (wc)
|
||||||
{
|
{
|
||||||
@@ -926,9 +929,8 @@ static int text_enriched_handler(struct
|
@@ -878,9 +880,8 @@ static int text_enriched_handler (BODY *
|
||||||
enriched_flush(&stte, 1);
|
enriched_flush (&stte, 1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
- ungetwc(wc, s->fpin);
|
- ungetwc (wc, s->fpin);
|
||||||
bytes++;
|
bytes++;
|
||||||
- state = TEXT;
|
- state = TEXT;
|
||||||
+ state = TEXT_GOTWC;
|
+ state = TEXT_GOTWC;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1657,7 +1659,7 @@ void mutt_decode_attachment(struct Body
|
@@ -1568,7 +1569,7 @@ void mutt_decode_attachment (BODY *b, ST
|
||||||
* all trailing spaces to improve interoperability; if $text_flowed is unset,
|
* strip all trailing spaces to improve interoperability;
|
||||||
* simply verbatim copy input
|
* if $text_flowed is unset, simply verbatim copy input
|
||||||
*/
|
*/
|
||||||
-static int text_plain_handler(struct Body *b, struct State *s)
|
-static int text_plain_handler (BODY *b, STATE *s)
|
||||||
+static int text_plain_handler(struct Body *b __attribute__((unused)), struct State *s)
|
+static int text_plain_handler (BODY *b __attribute__((unused)), STATE *s)
|
||||||
{
|
{
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
size_t l = 0, sz = 0;
|
size_t l = 0, sz = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user