From 36260035e489d115c63eec773bbcd3eabf554701 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 5 Jan 2015 09:36:54 +0100 Subject: [PATCH] fix crash related to logging BYE notifications (#1176282) - update pigeonhole to 0.4.6 --- .gitignore | 1 + d-2.2.15-pigeonbuildfix.patch | 31 ------------------------------- dovecot-2.2.15-03889e81929e.patch | 24 ++++++++++++++++++++++++ dovecot.spec | 17 +++++++++++------ sources | 2 +- 5 files changed, 37 insertions(+), 38 deletions(-) delete mode 100644 d-2.2.15-pigeonbuildfix.patch create mode 100644 dovecot-2.2.15-03889e81929e.patch diff --git a/.gitignore b/.gitignore index f4defb9..5f88e61 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ pigeonhole-snap0592366457df.tar.bz2 /dovecot-2.2-pigeonhole-0.4.3.tar.gz /dovecot-2.2.15.tar.gz /pigeonhole-snapded0c5a467aa.tar.bz2 +/dovecot-2.2-pigeonhole-0.4.6.tar.gz diff --git a/d-2.2.15-pigeonbuildfix.patch b/d-2.2.15-pigeonbuildfix.patch deleted file mode 100644 index 2a008db..0000000 --- a/d-2.2.15-pigeonbuildfix.patch +++ /dev/null @@ -1,31 +0,0 @@ - -# HG changeset patch -# User Stephan Bosch -# Date 1414266676 -7200 -# Node ID 15b2910b145c5e16fb9967d16387fc24104b0925 -# Parent 819b8fb22034a761b45c88f021a1e8b857ccacb4 -Adjusted to datastack-related changes in Dovecot lib-storage. - -diff -r 819b8fb22034 -r 15b2910b145c src/lib-sieve/util/edit-mail.c ---- a/src/lib-sieve/util/edit-mail.c Sun Oct 19 22:50:23 2014 +0200 -+++ b/src/lib-sieve/util/edit-mail.c Sat Oct 25 21:51:16 2014 +0200 -@@ -1473,7 +1473,7 @@ - (&edmail->wrapped->mail, field_name, decode_to_utf8, value_r); - } - -- t_array_init(&header_values, 1); -+ p_array_init(&header_values, edmail->mail.pool, 1); - (void)array_append_space(&header_values); - *value_r = array_idx(&header_values, 0); - return 0; -@@ -1489,7 +1489,7 @@ - } - - /* Fill result array */ -- t_array_init(&header_values, 32); -+ p_array_init(&header_values, edmail->mail.pool, 32); - field_idx = header_idx->first; - while ( field_idx != NULL ) { - - - diff --git a/dovecot-2.2.15-03889e81929e.patch b/dovecot-2.2.15-03889e81929e.patch new file mode 100644 index 0000000..d5c4a17 --- /dev/null +++ b/dovecot-2.2.15-03889e81929e.patch @@ -0,0 +1,24 @@ + +# HG changeset patch +# User Timo Sirainen +# Date 1414434274 -7200 +# Node ID 03889e81929ef19653fe8842abac515f7764a526 +# Parent c77d602d4be48f705977cf0d4eca963408b7c1f0 +master: Don't send broken BYE notifications to log process. + +diff -r c77d602d4be4 -r 03889e81929e src/master/service-log.c +--- a/src/master/service-log.c Mon Oct 27 20:14:47 2014 +0200 ++++ b/src/master/service-log.c Mon Oct 27 20:24:34 2014 +0200 +@@ -55,6 +55,11 @@ + { + const char *data; + ++ if (process->service->log_process_internal_fd == -1) { ++ /* another log process was just destroyed */ ++ return 0; ++ } ++ + data = t_strdup_printf("%d %s BYE\n", + process->service->log_process_internal_fd, + dec2str(process->pid)); + diff --git a/dovecot.spec b/dovecot.spec index 3f8da8c..7c91942 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -5,7 +5,7 @@ Name: dovecot Epoch: 1 Version: 2.2.15 %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 @@ -14,7 +14,7 @@ URL: http://www.dovecot.org/ Source: http://www.dovecot.org/releases/2.2/%{name}-%{version}%{?prever}.tar.gz Source1: dovecot.init Source2: dovecot.pam -%global pigeonholever 0.4.3 +%global pigeonholever 0.4.6 Source8: http://www.rename-it.nl/dovecot/2.2/dovecot-2.2-pigeonhole-%{pigeonholever}.tar.gz #wget http://hg.rename-it.nl/dovecot-2.2-pigeonhole/archive/%{pigeonholever}.tar.bz2 -O dovecot-2.2-pigeonhole-%{pigeonholever}.tar.bz2 #Source8: dovecot-2.2-pigeonhole-%{pigeonholever}.tar.bz2 @@ -36,7 +36,7 @@ Patch5: dovecot-2.1-privatetmp.patch #wait for network Patch6: dovecot-2.1.10-waitonline.patch Patch7: dovecot-2.2.13-online.patch -Patch8: d-2.2.15-pigeonbuildfix.patch +Patch9: dovecot-2.2.15-03889e81929e.patch Source15: prestartscript @@ -134,9 +134,9 @@ This package provides the development files for dovecot. %patch5 -p1 -b .privatetmp %patch6 -p1 -b .waitonline %patch7 -p1 -b .online -pushd dovecot-2*2-pigeonhole-%{pigeonholever} -%patch8 -p1 -b .pigeonbuildfix -popd +%patch9 -p1 -b .03889e81929e +#pushd dovecot-2*2-pigeonhole-%{pigeonholever} +#popd sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src/plugins/fts-lucene/Makefile.in %build @@ -471,6 +471,7 @@ make check %{_libdir}/dovecot/doveadm/*sieve* %{_libdir}/dovecot/*_sieve_plugin.so %{_libdir}/dovecot/settings/libmanagesieve_*.so +%{_libdir}/dovecot/settings/libpigeonhole_*.so %{_libdir}/dovecot/sieve/ %{_mandir}/man1/sieve-dump.1* @@ -491,6 +492,10 @@ make check %{_libdir}/%{name}/dict/libdriver_pgsql.so %changelog +* Mon Jan 05 2015 Michal Hlavinka - 1:2.2.15-2 +- fix crash related to logging BYE notifications (#1176282) +- update pigeonhole to 0.4.6 + * Thu Oct 30 2014 Michal Hlavinka - 1:2.2.15-1 - dovecot updated to 2.2.15 - various race condition fixes to LAYOUT=index diff --git a/sources b/sources index 11d16fe..703ef0e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ c6c176943bd832c780fbb5d2f8850952 dovecot-2.2.15.tar.gz -b52858c0016b9ad7dabccf01f0098dbd dovecot-2.2-pigeonhole-0.4.3.tar.gz +9c41cfda06129ac85700b5ddce809d95 dovecot-2.2-pigeonhole-0.4.6.tar.gz