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

« back to all changes in this revision

Viewing changes to src/plugins/acl/acl-api.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:
3
3
 
4
4
struct mailbox_list;
5
5
struct mail_storage;
 
6
struct mailbox;
6
7
struct acl_object;
7
8
 
8
9
/* Show mailbox in mailbox list. Allow subscribing to it. */
18
19
#define MAIL_ACL_WRITE_DELETED  "write-deleted"
19
20
/* Allow saving and copying mails into the mailbox */
20
21
#define MAIL_ACL_INSERT         "insert"
 
22
/* Allow posting mails to the mailbox (e.g. Sieve fileinto) */
 
23
#define MAIL_ACL_POST           "post"
21
24
/* Allow expunging mails */
22
25
#define MAIL_ACL_EXPUNGE        "expunge"
23
26
/* Allow creating child mailboxes */
48
51
};
49
52
 
50
53
enum acl_modify_mode {
 
54
        /* Remove rights from existing ACL */
 
55
        ACL_MODIFY_MODE_REMOVE = 0,
51
56
        /* Add rights to existing ACL (or create a new one) */
52
 
        ACL_MODIFY_MODE_ADD = 0,
53
 
        /* Remove rights from existing ACL */
54
 
        ACL_MODIFY_MODE_REMOVE,
 
57
        ACL_MODIFY_MODE_ADD,
55
58
        /* Replace existing ACL with given rights */
56
 
        ACL_MODIFY_MODE_REPLACE
 
59
        ACL_MODIFY_MODE_REPLACE,
 
60
        /* Clear all the rights from an existing ACL */
 
61
        ACL_MODIFY_MODE_CLEAR
57
62
};
58
63
 
59
64
struct acl_rights {
62
67
        /* Identifier, eg. username / group name */
63
68
        const char *identifier;
64
69
 
65
 
        /* Rights assigned */
 
70
        /* Rights assigned. NULL entry can be ignored, but { NULL } means user
 
71
           has no rights. */
66
72
        const char *const *rights;
67
73
        /* Negative rights assigned */
68
74
        const char *const *neg_rights;
 
75
 
 
76
        /* These rights are global for all users */
 
77
        unsigned int global:1;
69
78
};
70
79
 
71
80
struct acl_rights_update {
83
92
                 const char *acl_username, const char *const *groups,
84
93
                 bool owner);
85
94
void acl_backend_deinit(struct acl_backend **backend);
 
95
 
 
96
/* Returns the acl_username passed to acl_backend_init(). Note that with
 
97
   anonymous users NULL is returned. */
 
98
const char *acl_backend_get_acl_username(struct acl_backend *backend);
 
99
 
86
100
/* Returns TRUE if user isn't anonymous. */
87
101
bool acl_backend_user_is_authenticated(struct acl_backend *backend);
88
102
/* Returns TRUE if user owns the storage. */
119
133
/* Returns 0 = ok, -1 = internal error */
120
134
int acl_object_get_my_rights(struct acl_object *aclobj, pool_t pool,
121
135
                             const char *const **rights_r);
 
136
/* Returns the default rights for the object. */
 
137
const char *const *acl_object_get_default_rights(struct acl_object *aclobj);
122
138
 
123
139
/* Update ACL of given object. */
124
140
int acl_object_update(struct acl_object *aclobj,
125
 
                      const struct acl_rights_update *rights);
 
141
                      const struct acl_rights_update *update);
126
142
 
127
143
/* List all identifiers. */
128
144
struct acl_object_list_iter *acl_object_list_init(struct acl_object *aclobj);