diff --git a/dovecot-2.2.7-10c0aae82d0d.patch b/dovecot-2.2.7-10c0aae82d0d.patch new file mode 100644 index 0000000..99b4367 --- /dev/null +++ b/dovecot-2.2.7-10c0aae82d0d.patch @@ -0,0 +1,24 @@ + +# HG changeset patch +# User Timo Sirainen +# Date 1383514035 -7200 +# Node ID 10c0aae82d0dee0b0107c2262db50d5f6984c181 +# Parent 653d5a81a22e73ff91264f7e7277b1c0206574ec +ostream: Mark stream closed before handling its callback to avoid infinite loops. +The callback could call o_stream_copy_error_from_parent(), which in turn +would try to close the same ostream again. + +diff -r 653d5a81a22e -r 10c0aae82d0d src/lib/ostream.c +--- a/src/lib/ostream.c Sun Nov 03 22:04:53 2013 +0200 ++++ b/src/lib/ostream.c Sun Nov 03 23:27:15 2013 +0200 +@@ -46,8 +46,8 @@ + static void o_stream_close_full(struct ostream *stream, bool close_parents) + { + if (!stream->closed) { ++ stream->closed = TRUE; + io_stream_close(&stream->real_stream->iostream, close_parents); +- stream->closed = TRUE; + } + + if (stream->stream_errno == 0) + diff --git a/dovecot.spec b/dovecot.spec index 0836233..36aa304 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -5,7 +5,7 @@ Name: dovecot Epoch: 1 Version: 2.2.7 %global prever %{nil} -Release: 1%{?dist} +Release: 2%{?dist} #dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2 License: MIT and LGPLv2 Group: System Environment/Daemons @@ -35,6 +35,7 @@ Patch5: dovecot-2.1-privatetmp.patch #wait for network Patch6: dovecot-2.1.10-waitonline.patch +Patch7: dovecot-2.2.7-10c0aae82d0d.patch Source15: prestartscript Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -131,6 +132,7 @@ This package provides the development files for dovecot. %patch4 -p1 -b .reload %patch5 -p1 -b .privatetmp %patch6 -p1 -b .waitonline +%patch7 -p1 -b .10c0aae82d0d sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src/plugins/fts-lucene/Makefile.in %build @@ -484,6 +486,9 @@ make check %{_libdir}/%{name}/dict/libdriver_pgsql.so %changelog +* Thu Nov 14 2013 Michal Hlavinka - 1:2.2.7-2 +- fix ostream infinite loop (#1029906) + * Mon Nov 04 2013 Michal Hlavinka - 1:2.2.7-1 - dovecot updated to 2.2.7 - master process was doing a hostname.domain lookup for each created