[dovecot] fix regression in config file parsing (#690401)

Michal Hlavinka mhlavink at fedoraproject.org
Mon Mar 28 06:43:36 UTC 2011


commit bb49692b031af9f66c629153420ce39d27d894cb
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Mon Mar 28 08:43:28 2011 +0200

    fix regression in config file parsing (#690401)

 dovecot-2.0.11-settings.patch |   25 +++++++++++++++++++++++++
 dovecot.spec                  |    8 +++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/dovecot-2.0.11-settings.patch b/dovecot-2.0.11-settings.patch
new file mode 100644
index 0000000..36e5c21
--- /dev/null
+++ b/dovecot-2.0.11-settings.patch
@@ -0,0 +1,25 @@
+
+--- a/src/lib-settings/settings-parser.c	Fri Mar 04 20:53:46 2011 +0200
++++ b/src/lib-settings/settings-parser.c	Sat Mar 26 01:10:59 2011 +0200
+@@ -693,8 +693,15 @@
+ 		if (!settings_find_key_nth(ctx, parent_key, &parent_n,
+ 					   &parent_def, &parent_link))
+ 			return FALSE;
+-		if (parent_def->type != SET_STRLIST)
+-			return FALSE;
++		if (parent_def == NULL) {
++			/* we'll get here with e.g. "plugin/a/b=val".
++			   not sure if we should ever do anything here.. */
++			if (strcmp(parent_link->full_key, parent_key) != 0)
++				return FALSE;
++		} else {
++			if (parent_def->type != SET_STRLIST)
++				return FALSE;
++		}
+ 
+ 		/* setting parent_key=0 adds it to links list */
+ 		if (settings_parse_keyvalue(ctx, parent_key, "0") <= 0)
+
+
+
+
diff --git a/dovecot.spec b/dovecot.spec
index 94107c8..ccbaa37 100644
--- a/dovecot.spec
+++ b/dovecot.spec
@@ -2,7 +2,7 @@ Summary: Secure imap and pop3 server
 Name: dovecot
 Epoch: 1
 Version: 2.0.11
-Release: 3%{?dist}
+Release: 4%{?dist}
 #dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2
 License: MIT and LGPLv2
 Group: System Environment/Daemons
@@ -26,6 +26,9 @@ Patch1: dovecot-2.0-defaultconfig.patch
 Patch2: dovecot-1.0.beta2-mkcert-permissions.patch
 Patch3: dovecot-1.0.rc7-mkcert-paths.patch
 
+#for < 2.0.12, rhbz#690401
+Patch4: dovecot-2.0.11-settings.patch
+
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: openssl-devel, pam-devel, zlib-devel, bzip2-devel, libcap-devel
 BuildRequires: libtool, autoconf, automake, pkgconfig
@@ -394,6 +397,9 @@ make check
 %{_libdir}/%{name}/dict/libdriver_pgsql.so
 
 %changelog
+* Mon Mar 28 2011 Michal Hlavinka <mhlavink at redhat.com> - 1:2.0.11-4
+- fix regression in config file parsing (#690401)
+
 * Wed Mar 23 2011 Dan Horák <dan at danny.cz> - 1:2.0.11-3
 - rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
 


More information about the scm-commits mailing list