~ubuntu-branches/ubuntu/trusty/dovecot/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/fix-checkscript-segfault.patch

  • Committer: Package Import Robot
  • Author(s): James Page, James Page, Ante Karamatic
  • Date: 2013-02-11 12:41:24 UTC
  • mfrom: (4.1.33 sid)
  • Revision ID: package-import@ubuntu.com-20130211124124-v7bdegzftlhw7yfr
Tags: 1:2.1.7-7ubuntu1
[ James Page ]
* Merge from Debian unstable (LP: #1117613, #1075456), 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/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.
* Dropped changes, included in Debian:
  + d/{control,rules}: enable PIE hardening.
  + d/control: Drop B-D on systemd.
* d/p/mail-stack-delivery.postinst: Updated to ensure that configured SSL
  cert and key locations are used when configuring postfix, sorted out
  formatting.
* d/p/dovecot-core.postinst: Create compat links to old style, existing
  SSL cert and key if found.
* d/rules: Don't pass hardening flags for DRAC plugin.
* d/dovecot-{pop3d,imapd}.prerm: Re-sync with Debian.
* d/dovecot-core.lintian-overrides: Drop override for DRAC plugin as not
  required in Ubuntu.
* d/01-mail-stack-delivery: Renamed 99-mail-stack-delivery to ensure that
  the mail-stack-delivery configuration overrides configuration options
  set elsewhere, updated with new cert/key file locations.

[ Ante Karamatic ]
* Change configuration file for LDA on new installs and upgrades
  (LP: #671065).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Marco Nenciarini <mnencia@debian.org>
 
2
Date: Sat, 11 Aug 2012 00:55:54 +0200
 
3
Subject: fix-checkscript-segfault
 
4
Upstream: http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/6ceeb6421231
 
5
Description: fixed segfault bug triggered by CHECKSCRIPT command.
 
6
 # HG changeset patch
 
7
 # User Stephan Bosch <stephan@rename-it.nl>
 
8
 # Date 1342130270 -7200
 
9
 # Node ID 6ceeb642123117ed8377f3b0d7d28171f790e911
 
10
 # Parent  602d93069d3a1c93866178308bd4d03f20a15f73
 
11
 ManageSieve: fixed segfault bug triggered by CHECKSCRIPT command.
 
12
---
 
13
 pigeonhole/src/lib-sievestorage/sieve-storage-save.c |   13 +++++++------
 
14
 1 file changed, 7 insertions(+), 6 deletions(-)
 
15
 
 
16
diff --git a/pigeonhole/src/lib-sievestorage/sieve-storage-save.c b/pigeonhole/src/lib-sievestorage/sieve-storage-save.c
 
17
index c93237d..cbb6504 100644
 
18
--- a/pigeonhole/src/lib-sievestorage/sieve-storage-save.c
 
19
+++ b/pigeonhole/src/lib-sievestorage/sieve-storage-save.c
 
20
@@ -317,19 +317,20 @@ struct sieve_script *sieve_storage_save_get_tempscript
 
21
 bool sieve_storage_save_will_activate
 
22
 (struct sieve_save_context *ctx)
 
23
 {
 
24
-       const char *scriptname;
 
25
-       int ret = 0;
 
26
+       bool result = FALSE;
 
27
+
 
28
+       if ( ctx->scriptname != NULL ) T_BEGIN {
 
29
+               const char *scriptname;
 
30
+               int ret;
 
31
 
 
32
-       T_BEGIN {
 
33
                ret = sieve_storage_get_active_scriptfile(ctx->storage, &scriptname);
 
34
-       
 
35
                if ( ret > 0 ) {
 
36
-                       /* Is the requested script active? */
 
37
-                       ret = ( strcmp(ctx->scriptname, scriptname) == 0 ? 1 : 0 );
 
38
+                       /* Is the requested script active? */
 
39
+                       result = ( strcmp(ctx->scriptname, scriptname) == 0 );
 
40
                }
 
41
        } T_END;
 
42
 
 
43
-       return ret;
 
44
+       return result;
 
45
 }
 
46
 
 
47
 int sieve_storage_save_commit(struct sieve_save_context **ctx)