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

« back to all changes in this revision

Viewing changes to src/plugins/acl/acl-plugin.h

  • 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:
1
1
#ifndef ACL_PLUGIN_H
2
2
#define ACL_PLUGIN_H
3
3
 
 
4
#include "mail-user.h"
4
5
#include "mail-storage-private.h"
 
6
#include "acl-storage.h"
5
7
 
6
8
#define ACL_CONTEXT(obj) \
7
9
        MODULE_CONTEXT(obj, acl_storage_module)
8
 
 
9
 
enum acl_storage_rights {
10
 
        ACL_STORAGE_RIGHT_LOOKUP,
11
 
        ACL_STORAGE_RIGHT_READ,
12
 
        ACL_STORAGE_RIGHT_WRITE,
13
 
        ACL_STORAGE_RIGHT_WRITE_SEEN,
14
 
        ACL_STORAGE_RIGHT_WRITE_DELETED,
15
 
        ACL_STORAGE_RIGHT_INSERT,
16
 
        ACL_STORAGE_RIGHT_EXPUNGE,
17
 
        ACL_STORAGE_RIGHT_CREATE,
18
 
        ACL_STORAGE_RIGHT_DELETE,
19
 
        ACL_STORAGE_RIGHT_ADMIN,
20
 
 
21
 
        ACL_STORAGE_RIGHT_COUNT
 
10
#define ACL_USER_CONTEXT(obj) \
 
11
        MODULE_CONTEXT(obj, acl_user_module)
 
12
 
 
13
struct acl_user {
 
14
        union mail_user_module_context module_ctx;
 
15
 
 
16
        const char *master_user;
 
17
        const char *acl_env;
 
18
        const char *const *groups;
 
19
 
 
20
        struct acl_lookup_dict *acl_lookup_dict;
 
21
        time_t last_shared_add_check;
22
22
};
23
23
 
24
24
struct acl_storage_rights_context {
31
31
        struct acl_storage_rights_context rights;
32
32
};
33
33
 
34
 
extern void (*acl_next_hook_mail_storage_created)
35
 
        (struct mail_storage *storage);
 
34
extern void (*acl_next_hook_mail_storage_created)(struct mail_storage *storage);
36
35
extern void (*acl_next_hook_mailbox_list_created)(struct mailbox_list *list);
 
36
extern void (*acl_next_hook_mail_user_created)(struct mail_user *user);
37
37
extern MODULE_CONTEXT_DEFINE(acl_storage_module, &mail_storage_module_register);
 
38
extern MODULE_CONTEXT_DEFINE(acl_user_module, &mail_user_module_register);
38
39
 
39
40
void acl_mail_storage_created(struct mail_storage *storage);
40
41
void acl_mailbox_list_created(struct mailbox_list *list);
 
42
void acl_mail_user_created(struct mail_user *list);
41
43
 
42
44
struct mailbox *acl_mailbox_open_box(struct mailbox *box);
43
45