~james-page/ubuntu/raring/dovecot/autopkgtest

« back to all changes in this revision

Viewing changes to src/config/config-filter.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-06-11 11:11:54 UTC
  • mfrom: (1.15.2) (4.1.27 sid)
  • Revision ID: package-import@ubuntu.com-20120611111154-678cwbdj6ktgsv1h
Tags: 1:2.1.7-1ubuntu1
* Merge from Debian unstable, remaining changes:
  + Add mail-stack-delivery package:
    - Update d/rules
    - d/control: convert existing dovecot-postfix package to a dummy
      package and add new mail-stack-delivery package.
    - Update maintainer scripts.
    - Rename d/dovecot-postfix.* to debian/mail-stack-delivery.*
    - d/mail-stack-delivery.preinst: Move previously installed backups and
      config files to a new package namespace.
    - d/mail-stack-delivery.prerm: Added to handle downgrades.
  + Use Snakeoil SSL certificates by default:
    - d/control: Depend on ssl-cert.
    - d/dovecot-core.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - d/dovecot-core.ufw.profile: new ufw profile.
    - d/rules: install profile in dovecot-core.
    - d/control: dovecot-core - suggest ufw.
  + d/{control,rules}: enable PIE hardening.
  + d/dovecot-core.dirs: Added usr/share/doc/dovecot-core
  + Add apport hook:
    - d/rules, d/source_dovecot.py
  + Add upstart job:
    - d/rules, d/dovecot-core.dovecot.upstart, d/control,
      d/dovecot-core.dirs, dovecot-imapd.{postrm, postinst, prerm},
      d/dovecot-pop3d.{postinst, postrm, prerm}.
      d/mail-stack-deliver.postinst: Convert init script to upstart.
  + d/control: Added Pre-Depends: dpkg (>= 1.15.6) to dovecot-dbg to support
    xz compression in Ubuntu.
  + d/control: Demote dovecot-common Recommends: to Suggests: to prevent
    install of extra packages on upgrade.
  + d/patches/dovecot-drac.patch: Updated with version for dovecot >= 2.0.0.
  + d/control: Drop B-D on systemd.
* Dropped changes:
  + d/patches/fix-racey-restart.patch: part of 2.1.x, no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */
 
1
/* Copyright (c) 2005-2012 Dovecot authors, see the included COPYING file */
2
2
 
3
3
#include "lib.h"
4
4
#include "array.h"
287
287
                                   const struct config_filter_parser *src,
288
288
                                   pool_t pool, const char **error_r)
289
289
{
 
290
        const char *conflict_key;
290
291
        unsigned int i;
291
292
 
292
293
        for (i = 0; dest[i].root != NULL; i++) {
293
294
                if (settings_parser_apply_changes(dest[i].parser,
294
295
                                                  src->parsers[i].parser, pool,
295
 
                                                  error_r) < 0) {
 
296
                                                  error_r == NULL ? NULL :
 
297
                                                  &conflict_key) < 0) {
 
298
                        i_assert(error_r != NULL);
296
299
                        *error_r = t_strdup_printf("Conflict in setting %s "
297
 
                                "found from filter at %s", *error_r,
 
300
                                "found from filter at %s", conflict_key,
298
301
                                src->file_and_line);
299
302
                        return -1;
300
303
                }
314
317
        const char *error = NULL, **error_p;
315
318
        unsigned int i, count;
316
319
 
 
320
        /* get the matching filters. the most specific ones are handled first,
 
321
           so that if more generic filters try to override settings we'll fail
 
322
           with an error. Merging SET_STRLIST types requires
 
323
           settings_parser_apply_changes() to work a bit unintuitively by
 
324
           letting the destination settings override the source settings. */
317
325
        src = config_filter_find_all(ctx, module, filter, output_r);
318
326
 
319
327
        /* all of them should have the same number of parsers.