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

« back to all changes in this revision

Viewing changes to src/lib-storage/mail-user.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:
20
20
        const char *_home;
21
21
 
22
22
        uid_t uid;
 
23
        gid_t gid;
23
24
        const char *service;
24
25
        struct ip_addr *local_ip, *remote_ip;
25
26
        const struct var_expand_table *var_expand_table;
34
35
        struct mail_storage *storages;
35
36
        ARRAY_DEFINE(hooks, const struct mail_storage_hooks *);
36
37
 
 
38
        struct mountpoint_list *mountpoints;
 
39
 
37
40
        /* Module-specific contexts. See mail_storage_module_id. */
38
41
        ARRAY_DEFINE(module_contexts, union mail_user_module_context *);
39
42
 
42
45
        /* User is an administrator. Allow operations not normally allowed
43
46
           for other people. */
44
47
        unsigned int admin:1;
 
48
        /* This is an autocreated user (e.g. for shared namespace or
 
49
           lda raw storage) */
 
50
        unsigned int autocreated:1;
45
51
        /* mail_user_init() has been called */
46
52
        unsigned int initialized:1;
47
53
        /* Shortcut to mail_storage_settings.mail_debug */
48
54
        unsigned int mail_debug:1;
49
55
        /* If INBOX can't be opened, log an error, but only once. */
50
56
        unsigned int inbox_open_error_logged:1;
 
57
        /* Fuzzy search works for this user (FTS enabled) */
 
58
        unsigned int fuzzy_search:1;
 
59
        /* We're running dsync */
 
60
        unsigned int dsyncing:1;
51
61
};
52
62
 
53
63
struct mail_user_module_register {
74
84
struct mail_user *mail_user_find(struct mail_user *user, const char *name);
75
85
 
76
86
/* Specify mail location %variable expansion data. */
77
 
void mail_user_set_vars(struct mail_user *user, uid_t uid, const char *service,
 
87
void mail_user_set_vars(struct mail_user *user, const char *service,
78
88
                        const struct ip_addr *local_ip,
79
89
                        const struct ip_addr *remote_ip);
80
90
/* Return %variable expansion table for the user. */
114
124
int mail_user_try_home_expand(struct mail_user *user, const char **path);
115
125
/* Returns unique user+ip identifier for anvil. */
116
126
const char *mail_user_get_anvil_userip_ident(struct mail_user *user);
 
127
/* Returns FALSE if path is in a mountpoint that should be mounted,
 
128
   but isn't mounted. In such a situation it's better to fail than to attempt
 
129
   any kind of automatic file/dir creations. error_r gives an error about which
 
130
   mountpoint should be mounted. */
 
131
bool mail_user_is_path_mounted(struct mail_user *user, const char *path,
 
132
                               const char **error_r);
117
133
 
118
134
#endif