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

« back to all changes in this revision

Viewing changes to src/lib-storage/index/mbox/mbox-storage.h

  • 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:
3
3
 
4
4
#include "index-storage.h"
5
5
#include "mbox-settings.h"
 
6
#include "mbox-md5.h"
6
7
 
7
8
/* Padding to leave in X-Keywords header when rewriting mbox */
8
9
#define MBOX_HEADER_PADDING 50
13
14
#define MBOX_SUBSCRIPTION_FILE_NAME ".subscriptions"
14
15
#define MBOX_INDEX_PREFIX "dovecot.index"
15
16
#define MBOX_INDEX_DIR_NAME ".imap"
 
17
#define MBOX_UIDVALIDITY_FNAME "dovecot-uidvalidity"
16
18
 
17
19
struct mbox_index_header {
18
20
        uint64_t sync_size;
19
21
        uint32_t sync_mtime;
20
22
        uint8_t dirty_flag;
21
23
        uint8_t unused[3];
22
 
        uint8_t mailbox_guid[MAIL_GUID_128_SIZE];
 
24
        guid_128_t mailbox_guid;
23
25
};
24
26
struct mbox_storage {
25
27
        struct mail_storage storage;
49
51
        struct mbox_index_header mbox_hdr;
50
52
        const struct mailbox_update *sync_hdr_update;
51
53
 
 
54
        struct mbox_md5_vfuncs md5_v;
 
55
 
52
56
        unsigned int no_mbox_file:1;
53
57
        unsigned int invalid_mbox_file:1;
54
58
        unsigned int mbox_broken_offsets:1;
57
61
        unsigned int mbox_used_privileges:1;
58
62
        unsigned int mbox_privileged_locking:1;
59
63
        unsigned int syncing:1;
 
64
        unsigned int backend_readonly:1;
 
65
        unsigned int backend_readonly_set:1;
60
66
};
61
67
 
62
68
struct mbox_transaction_context {
63
 
        struct index_transaction_context ictx;
 
69
        struct mailbox_transaction_context t;
 
70
        union mail_index_transaction_module_context module_ctx;
 
71
 
64
72
        unsigned int mbox_lock_id;
65
73
};
66
74
 
85
93
                                       struct mail_index_transaction_commit_result *result);
86
94
void mbox_transaction_save_rollback(struct mail_save_context *ctx);
87
95
 
 
96
bool mbox_is_backend_readonly(struct mbox_mailbox *mbox);
 
97
 
88
98
#endif