~ubuntu-branches/ubuntu/quantal/dovecot/quantal

« back to all changes in this revision

Viewing changes to sieve/src/testsuite/testsuite-script.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-29 09:21:32 UTC
  • mfrom: (4.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20100629092132-q4pr5lfuvmjqou19
Tags: 1:1.2.12-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  + Add mail-stack-delivery as per server-maverick-mail-integration spec:
   - Update debian/rules
   - Convert existing package to a dummy package and add new binary in debian/control
   - Update maintainer scripts.
   - Move previously installed backups and config files to new package name
     space in preinst
   - Add new debian/mail-stack-delivery.prerm to handle downgrades
   - Rename debian/dovecot-postfix.* to debian/mail-stack-delivery.*
  + Use Snakeoil SSL certificates by default.
    - debian/control: Depend on ssl-cert.
    - debian/patches/ssl-cert-snakeoil.dpatch: Change default SSL cert paths to snakeoil.
    - debian/dovecot-common.postinst: Relax grep for SSL_* a bit.
  + Add autopkgtest to debian/tests/*.
  + Add ufw integration:
    - Created debian/dovecot-common.ufw.profile.
    - debian/rules: install profile.
    - debian/control: suggest ufw.
  + debian/{control,rules}: enable PIE hardening.
  + debian/control: Update Vcs-* headers.
  + Add SMTP-AUTH support for Outlook (login auth mechanism) 
  + debian/dovecot-common.dirs: Added usr/share/doc/dovecot-common
  + debian/patches/fix-dovecot-config-parser.patch: Fix ordering of external config 
    files. (LP: #597818)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
/*
22
22
 * Tested script environment
23
 
 */ 
 
23
 */
24
24
 
25
25
struct sieve_binary *_testsuite_compiled_script;
26
26
 
49
49
                sieve_dir = t_strdup_until(script_path, sieve_dir+1);
50
50
 
51
51
        /* Currently needed for include (FIXME) */
52
 
        testsuite_setting_set("sieve_dir", 
 
52
        testsuite_setting_set("sieve_dir",
53
53
                t_strconcat(sieve_dir, "included", NULL));
54
 
        testsuite_setting_set("sieve_global_dir", 
 
54
        testsuite_setting_set("sieve_global_dir",
55
55
                t_strconcat(sieve_dir, "included-global", NULL));
56
 
        
 
56
 
57
57
        if ( (sbin = sieve_compile
58
58
                (sieve_instance, script_path, NULL, testsuite_log_ehandler)) == NULL )
59
59
                return NULL;
106
106
        scriptenv.duplicate_check = NULL;
107
107
        scriptenv.namespaces = renv->scriptenv->namespaces;
108
108
        scriptenv.trace_stream = renv->scriptenv->trace_stream;
109
 
        
 
109
 
110
110
        result = testsuite_result_get();
111
111
 
112
112
        /* Execute the script */
113
113
        interp=sieve_interpreter_create
114
114
                (_testsuite_compiled_script, testsuite_log_ehandler);
115
 
        
 
115
 
116
116
        if ( interp == NULL )
117
117
                return SIEVE_EXEC_BIN_CORRUPT;
118
 
                
 
118
 
119
119
        ret = sieve_interpreter_run
120
120
                (interp, renv->msgdata, &scriptenv, result);
121
121
 
167
167
        scriptenv.duplicate_mark = NULL;
168
168
        scriptenv.duplicate_check = NULL;
169
169
        scriptenv.namespaces = renv->scriptenv->namespaces;
170
 
        scriptenv.trace_stream = renv->scriptenv->trace_stream; 
 
170
        scriptenv.trace_stream = renv->scriptenv->trace_stream;
171
171
 
172
172
        /* Start execution */
173
173
 
184
184
                bool final = ( i == count - 1 );
185
185
 
186
186
                /* Open */
187
 
        
 
187
 
188
188
                if ( (sbin=_testsuite_script_compile(script_path)) == NULL )
189
189
                        break;
190
190
 
196
196
        }
197
197
 
198
198
        ret = sieve_multiscript_finish(&mscript, testsuite_log_ehandler, NULL);
199
 
        
 
199
 
200
200
        return ( ret > 0 );
201
201
}