fix regression in config file parsing (#690401)

This commit is contained in:
Michal Hlavinka 2011-03-28 08:43:28 +02:00
parent 5f460e247b
commit bb49692b03
2 changed files with 32 additions and 1 deletions

View File

@ -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)

View File

@ -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@redhat.com> - 1:2.0.11-4
- fix regression in config file parsing (#690401)
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1:2.0.11-3
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)