~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/lib-storage/index/dbox/dbox-sync.c

  • Committer: Bazaar Package Importer
  • Author(s): CHuck Short, Chuck Short
  • Date: 2009-11-06 00:47:29 UTC
  • mfrom: (4.1.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091106004729-i39n7v9e7d4h51f6
Tags: 1:1.2.6-1ubuntu1
* Merge from debian testing, remaining changes:
  Add new binary pkg dovecot-postfix that integrates postfix and dovecot
  automatically: (LP: #164837)
  + debian/control:
    - add new binary with short description
    - set Architecture all for dovecot-postfix (LP: #329878)
  + debian/dovecot-postfix.postinst:
    - create initial certificate symlinks to snakeoil.
    - set up postfix with postconf to:
      - use Maildir/ as the default mailbox.
      - use dovecot as the sasl authentication server.
      - use dovecot LDA (deliver).
      - use tls for smtp{d} services.
    - fix certificates paths in postfix' main.cf
    - add reject_unauth_destination to postfix' recipient restrictions
    - add reject_unknown_sender_domain to postfix' sender restrictions
    - rename configuration name on remove, delete on purge
    - restart dovecot after linking certificates
    - handle use case when postfix is unconfigurated
   + debian/dovecot-postfix.dirs: create backup directory for postfix's configuration
   + restart postfix and dovecot.
   + debian/dovecot-postfix.postrm:
     - remove all dovecot related configuration from postfix.
     - restart postfix and dovecot.
   + debian/dovecot-common.init:
     - check if /etc/dovecot/dovecot-postfix.conf exists and use it
       as the configuration file if so.
   + debian/patches/warning-ubuntu-postfix.dpatch
     - add warning about dovecot-postfix.conf in dovecot default 
       configuration file
   + debian/patches/dovecot-postfix.conf.diff:
     - Ubuntu server custom changes to the default dovecot configuration for
       better interfation with postfix
     - enable sieve plugin
   + debian/patches/dovecot-postfix.conf.diff:
     + Ubuntu server custom changes to the default dovecot configuration for
       better integration with postfix:
       - enable imap, pop3, imaps, pop3s and managesieve by default.
       - enable dovecot LDA (deliver).
       - enable SASL auth socket in postfix private directory.
   + debian/rules:
     - copy, patch and install dovecot-postfix.conf in /etc/dovecot/.
     - build architecure independent packages too
   + 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/*.
   + Fast TearDown: Update the lsb init header to not stop in level 6.
   + Add ufw integration:
     - Created debian/dovecot-common.ufw.profile.
     - debian/rules:
       + install profile
     - debian/control:
       + Suggest ufw
   + debian/{control,rules}: enable PIE hardening.
   + dovecot-imapd, dovecot-pop3: Replaces dovecot-common (<< 1:1.1). LP: #254721
   + debian/control:
     - Update Vcs-* headers.
   + debian/rules:
     - Create emtpy stamp.h.in files in dovecot-sieve/ and dovecot-managesieve/
       if they're not there since empty files are not included in the diff.gz 
       file.
   + Add SMTP-AUTH support for Outlook (login auth mechanism)
   + Dropped:
     - debian/patches/security-CVE-2009-3235: Applied upstream.
     - debian/patches/fix-pop3-assertion.dpatch: Applied upstream.
     - dovecot-sieve and dovecot-managesieve: Use the debian patches instead.

  [Chuck Short]
  - Updated dovecot-sieve to 0.1.13.
  - Updated dovecot-managesieve to 0.11.9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
                              &file_id, &offset))
30
30
                return -1;
31
31
 
32
 
        entry = hash_lookup(ctx->syncs, POINTER_CAST(file_id));
 
32
        entry = hash_table_lookup(ctx->syncs, POINTER_CAST(file_id));
33
33
        if (entry == NULL) {
34
34
                if (sync_rec->type == MAIL_INDEX_SYNC_TYPE_EXPUNGE ||
35
35
                    ctx->flush_dirty_flags) {
54
54
 
55
55
                entry = p_new(ctx->pool, struct dbox_sync_file_entry, 1);
56
56
                entry->file_id = file_id;
57
 
                hash_insert(ctx->syncs, POINTER_CAST(file_id), entry);
 
57
                hash_table_insert(ctx->syncs, POINTER_CAST(file_id), entry);
58
58
        }
59
59
        uid_file = (file_id & DBOX_FILE_ID_FLAG_UID) != 0;
60
60
 
205
205
 
206
206
        /* read all changes and sort them to file_id order */
207
207
        ctx->pool = pool_alloconly_create("dbox sync pool", 1024*32);
208
 
        ctx->syncs = hash_create(default_pool, ctx->pool, 0, NULL, NULL);
 
208
        ctx->syncs = hash_table_create(default_pool, ctx->pool, 0, NULL, NULL);
209
209
        i_array_init(&ctx->expunge_files, 32);
210
210
        i_array_init(&ctx->locked_files, 32);
211
211
 
225
225
 
226
226
        if (ret > 0) {
227
227
                /* now sync each file separately */
228
 
                iter = hash_iterate_init(ctx->syncs);
229
 
                while (hash_iterate(iter, &key, &value)) {
 
228
                iter = hash_table_iterate_init(ctx->syncs);
 
229
                while (hash_table_iterate(iter, &key, &value)) {
230
230
                        const struct dbox_sync_file_entry *entry = value;
231
231
 
232
232
                        if ((ret = dbox_sync_file(ctx, entry)) <= 0)
233
233
                                break;
234
234
                }
235
 
                hash_iterate_deinit(&iter);
 
235
                hash_table_iterate_deinit(&iter);
236
236
        }
237
237
 
238
238
        if (ret > 0)
243
243
 
244
244
        dbox_sync_unlock_files(ctx);
245
245
        array_free(&ctx->locked_files);
246
 
        hash_destroy(&ctx->syncs);
 
246
        hash_table_destroy(&ctx->syncs);
247
247
        pool_unref(&ctx->pool);
248
248
        return ret;
249
249
}