From 3146b51e39658ea865d3fe6c220596528292d3c7 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Mon, 22 Apr 2013 10:19:27 +0200 Subject: [PATCH] dovecot: add latest upstream patches for version 2.2.1 --- ...cot-2.2.1-0001-upstream-46dc61f6acae.patch | 50 ++++++++++++++ ...cot-2.2.1-0002-upstream-cac2978505b8.patch | 36 ++++++++++ ...cot-2.2.1-0003-upstream-994488139eca.patch | 67 +++++++++++++++++++ ...cot-2.2.1-0004-upstream-e819374de157.patch | 63 +++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 mail/dovecot/dovecot-2.2.1-0001-upstream-46dc61f6acae.patch create mode 100644 mail/dovecot/dovecot-2.2.1-0002-upstream-cac2978505b8.patch create mode 100644 mail/dovecot/dovecot-2.2.1-0003-upstream-994488139eca.patch create mode 100644 mail/dovecot/dovecot-2.2.1-0004-upstream-e819374de157.patch diff --git a/mail/dovecot/dovecot-2.2.1-0001-upstream-46dc61f6acae.patch b/mail/dovecot/dovecot-2.2.1-0001-upstream-46dc61f6acae.patch new file mode 100644 index 000000000..5ef426a39 --- /dev/null +++ b/mail/dovecot/dovecot-2.2.1-0001-upstream-46dc61f6acae.patch @@ -0,0 +1,50 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../dovecot/dovecot-2.2.1-0001-upstream-46dc61f6acae.patch +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + + +# HG changeset patch +# User Timo Sirainen +# Date 1366370963 -10800 +# Node ID 46dc61f6acae8b441ec2b131fa10d6747f194dde +# Parent 999564a5b2a57e13edb04b6cb211349c8d9fc30d +Compiling fix for Sun compilers. +I wish gcc/clang warned about these as well, as sometimes they indicate bugs. + +diff -r 999564a5b2a5 -r 46dc61f6acae src/imap-urlauth/imap-urlauth-worker.c +--- a/src/imap-urlauth/imap-urlauth-worker.c Fri Apr 19 00:38:05 2013 +0300 ++++ b/src/imap-urlauth/imap-urlauth-worker.c Fri Apr 19 14:29:23 2013 +0300 +@@ -941,7 +941,7 @@ + { + bool debug; + +- debug = getenv("DEBUG"); ++ debug = getenv("DEBUG") != NULL; + access_user = access_user != NULL ? access_user : getenv("USER"); + if (access_user == NULL && IS_STANDALONE()) + access_user = getlogin(); +diff -r 999564a5b2a5 -r 46dc61f6acae src/lib/ioloop.c +--- a/src/lib/ioloop.c Fri Apr 19 00:38:05 2013 +0300 ++++ b/src/lib/ioloop.c Fri Apr 19 14:29:23 2013 +0300 +@@ -663,7 +663,7 @@ + + bool io_loop_have_ios(struct ioloop *ioloop) + { +- return ioloop->io_files; ++ return ioloop->io_files != NULL; + } + + bool io_loop_have_immediate_timeouts(struct ioloop *ioloop) + diff --git a/mail/dovecot/dovecot-2.2.1-0002-upstream-cac2978505b8.patch b/mail/dovecot/dovecot-2.2.1-0002-upstream-cac2978505b8.patch new file mode 100644 index 000000000..e94f471c8 --- /dev/null +++ b/mail/dovecot/dovecot-2.2.1-0002-upstream-cac2978505b8.patch @@ -0,0 +1,36 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../dovecot/dovecot-2.2.1-0002-upstream-cac2978505b8.patch +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + + +# HG changeset patch +# User Timo Sirainen +# Date 1366480686 -10800 +# Node ID cac2978505b8f597a5f774821ff7217a4ad6209b +# Parent 46dc61f6acae8b441ec2b131fa10d6747f194dde +stats plugin: Fixed memory leak. + +diff -r 46dc61f6acae -r cac2978505b8 src/plugins/stats/stats-plugin.c +--- a/src/plugins/stats/stats-plugin.c Fri Apr 19 14:29:23 2013 +0300 ++++ b/src/plugins/stats/stats-plugin.c Sat Apr 20 20:58:06 2013 +0300 +@@ -388,6 +388,7 @@ + + trans_stats_add(&suser->session_stats.trans_stats, + &strans->trans->stats); ++ i_free(strans); + } + + static int + diff --git a/mail/dovecot/dovecot-2.2.1-0003-upstream-994488139eca.patch b/mail/dovecot/dovecot-2.2.1-0003-upstream-994488139eca.patch new file mode 100644 index 000000000..46b77b531 --- /dev/null +++ b/mail/dovecot/dovecot-2.2.1-0003-upstream-994488139eca.patch @@ -0,0 +1,67 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../dovecot/dovecot-2.2.1-0003-upstream-994488139eca.patch +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + + +# HG changeset patch +# User Timo Sirainen +# Date 1366480950 -10800 +# Node ID 994488139eca29ba4dd1a018e1b8c5597b9758d4 +# Parent cac2978505b8f597a5f774821ff7217a4ad6209b +Fixed a memory leak. + +diff -r cac2978505b8 -r 994488139eca src/lib-mail/istream-attachment-connector.c +--- a/src/lib-mail/istream-attachment-connector.c Sat Apr 20 20:58:06 2013 +0300 ++++ b/src/lib-mail/istream-attachment-connector.c Sat Apr 20 21:02:30 2013 +0300 +@@ -88,6 +88,20 @@ + return 0; + } + ++static void ++istream_attachment_connector_free(struct istream_attachment_connector *conn) ++{ ++ struct istream *const *streamp, *stream; ++ ++ array_foreach(&conn->streams, streamp) { ++ stream = *streamp; ++ if (stream != NULL) ++ i_stream_unref(&stream); ++ } ++ i_stream_unref(&conn->base_input); ++ pool_unref(&conn->pool); ++} ++ + struct istream * + istream_attachment_connector_finish(struct istream_attachment_connector **_conn) + { +@@ -111,8 +125,7 @@ + inputs = array_idx_modifiable(&conn->streams, 0); + input = i_stream_create_concat(inputs); + +- i_stream_unref(&conn->base_input); +- pool_unref(&conn->pool); ++ istream_attachment_connector_free(conn); + return input; + } + +@@ -122,6 +135,5 @@ + + *_conn = NULL; + +- i_stream_unref(&conn->base_input); +- pool_unref(&conn->pool); ++ istream_attachment_connector_free(conn); + } + diff --git a/mail/dovecot/dovecot-2.2.1-0004-upstream-e819374de157.patch b/mail/dovecot/dovecot-2.2.1-0004-upstream-e819374de157.patch new file mode 100644 index 000000000..bb1230309 --- /dev/null +++ b/mail/dovecot/dovecot-2.2.1-0004-upstream-e819374de157.patch @@ -0,0 +1,63 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../dovecot/dovecot-2.2.1-0004-upstream-e819374de157.patch +# Copyright (C) 2013 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + + +# HG changeset patch +# User Timo Sirainen +# Date 1366484267 -10800 +# Node ID e819374de157032cc3188ab1532a20834d3da6e7 +# Parent 994488139eca29ba4dd1a018e1b8c5597b9758d4 +lib-storage: Avoid wasting data stack during searches. + +diff -r 994488139eca -r e819374de157 src/lib-storage/index/index-search.c +--- a/src/lib-storage/index/index-search.c Sat Apr 20 21:02:30 2013 +0300 ++++ b/src/lib-storage/index/index-search.c Sat Apr 20 21:57:47 2013 +0300 +@@ -1377,7 +1377,9 @@ + } + for (i = 0; i < n && ret < 0; i++) { + ctx->cur_mail->lookup_abort = cache_lookups[i]; +- ret = search_match_once(ctx); ++ T_BEGIN { ++ ret = search_match_once(ctx); ++ } T_END; + } + ctx->cur_mail->lookup_abort = MAIL_LOOKUP_ABORT_NEVER; + search_match_finish(ctx, ret); +@@ -1556,7 +1558,9 @@ + int ret = 0; + + while ((mail = index_search_get_mail(ctx)) != NULL) { +- ret = search_more_with_mail(ctx, mail); ++ T_BEGIN { ++ ret = search_more_with_mail(ctx, mail); ++ } T_END; + if (ret <= 0) + break; + +@@ -1612,8 +1616,10 @@ + mail_search_args_result_deserialize(ctx->mail_ctx.args, + imail->data.search_results->data, + imail->data.search_results->used); +- ret = search_match_once(ctx); +- search_match_finish(ctx, ret); ++ T_BEGIN { ++ ret = search_match_once(ctx); ++ search_match_finish(ctx, ret); ++ } T_END; + ctx->cur_mail = NULL; + return ret > 0; + } +