~ubuntu-branches/ubuntu/utopic/dovecot/utopic-proposed

« back to all changes in this revision

Viewing changes to pigeonhole/src/lib-sieve/plugins/include/ext-include.c

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-01-08 09:35:49 UTC
  • mfrom: (4.1.35 sid)
  • Revision ID: package-import@ubuntu.com-20140108093549-i72o93pux8p0dlaf
Tags: 1:2.2.9-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/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.
  + Use the autotools-dev dh addon to update config.guess/config.sub for
    arm64.
* Dropped changes, included in Debian:
  - Update Dovecot name to reflect distribution in login greeting.
  - Update Drac plugin for >= 2.0.0 support.
* d/control: Drop dovecot-postfix package as its no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2002-2012 Pigeonhole authors, see the included COPYING file
 
1
/* Copyright (c) 2002-2013 Pigeonhole authors, see the included COPYING file
2
2
 */
3
3
 
4
4
/* Extension include
5
5
 * -----------------
6
6
 *
7
7
 * Authors: Stephan Bosch
8
 
 * Specification: draft-ietf-sieve-include-01
9
 
 * Implementation: mostly full, but required ManageSieve behavior is not
10
 
 *                 implemented
 
8
 * Specification: RFC 6609
 
9
 * Implementation: full
11
10
 * Status: testing
12
11
 *
13
12
 */
34
33
#include "ext-include-binary.h"
35
34
#include "ext-include-variables.h"
36
35
 
37
 
/* 
38
 
 * Operations 
 
36
/*
 
37
 * Operations
39
38
 */
40
39
 
41
 
static const struct sieve_operation_def *ext_include_operations[] = { 
42
 
        &include_operation, 
 
40
static const struct sieve_operation_def *ext_include_operations[] = {
 
41
        &include_operation,
43
42
        &return_operation,
44
43
        &global_operation
45
44
};
46
45
 
47
 
/* 
 
46
/*
48
47
 * Extension
49
48
 */
50
 
 
 
49
 
51
50
/* Forward declaration */
52
51
 
53
52
static bool ext_include_validator_load
55
54
static bool ext_include_generator_load
56
55
        (const struct sieve_extension *ext, const struct sieve_codegen_env *cgenv);
57
56
static bool ext_include_interpreter_load
58
 
        (const struct sieve_extension *ext, const struct sieve_runtime_env *renv, 
 
57
        (const struct sieve_extension *ext, const struct sieve_runtime_env *renv,
59
58
                sieve_size_t *address);
60
59
static bool ext_include_binary_load
61
60
        (const struct sieve_extension *ext, struct sieve_binary *binary);
62
61
 
63
62
/* Extension objects */
64
63
 
65
 
const struct sieve_extension_def include_extension = { 
66
 
        "include", 
67
 
        ext_include_load,
68
 
        ext_include_unload,
69
 
        ext_include_validator_load, 
70
 
        ext_include_generator_load,
71
 
        ext_include_interpreter_load,
72
 
        ext_include_binary_load,
73
 
        ext_include_binary_dump,
74
 
        ext_include_code_dump,
75
 
        SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations),
76
 
        SIEVE_EXT_DEFINE_NO_OPERANDS
 
64
const struct sieve_extension_def include_extension = {
 
65
        .name = "include",
 
66
        .version = 1,
 
67
 
 
68
        .load = ext_include_load,
 
69
        .unload = ext_include_unload,
 
70
        .validator_load = ext_include_validator_load,
 
71
        .generator_load = ext_include_generator_load,
 
72
        .interpreter_load = ext_include_interpreter_load,
 
73
        .binary_load = ext_include_binary_load,
 
74
        .binary_dump = ext_include_binary_dump,
 
75
        .code_dump = ext_include_code_dump,
 
76
 
 
77
        SIEVE_EXT_DEFINE_OPERATIONS(ext_include_operations)
77
78
};
78
79
 
79
80
static bool ext_include_validator_load
92
93
        ext_include_variables_global_namespace_init(ext, valdtr);
93
94
 
94
95
        return TRUE;
95
 
}       
 
96
}
96
97
 
97
98
static bool ext_include_generator_load
98
99
(const struct sieve_extension *ext, const struct sieve_codegen_env *cgenv)
103
104
}
104
105
 
105
106
static bool ext_include_interpreter_load
106
 
(const struct sieve_extension *ext, const struct sieve_runtime_env *renv, 
 
107
(const struct sieve_extension *ext, const struct sieve_runtime_env *renv,
107
108
        sieve_size_t *address ATTR_UNUSED)
108
109
{
109
110
        ext_include_interpreter_context_init(ext, renv->interp);
110
 
        
 
111
 
111
112
        return TRUE;
112
113
}
113
114