annotate src/plugins/acl/acl-plugin.c @ 14133:ba770cba5598

Updated copyright notices to include year 2012.
author Timo Sirainen <tss@iki.fi>
date Sun, 12 Feb 2012 18:55:28 +0200
parents 447bce266022
children 73916b7be94e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14133
ba770cba5598 Updated copyright notices to include year 2012.
Timo Sirainen <tss@iki.fi>
parents: 12782
diff changeset
1 /* Copyright (c) 2005-2012 Dovecot authors, see the included COPYING file */
4077
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
2
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
3 #include "lib.h"
4808
93bc9770f938 Initial code for separation of mailbox accessing and directory layout
Timo Sirainen <tss@iki.fi>
parents: 4077
diff changeset
4 #include "mailbox-list-private.h"
4077
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
5 #include "acl-api.h"
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
6 #include "acl-plugin.h"
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
7
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
8 #include <stdlib.h>
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
9
10646
d4fd28f07507 plugins: Use DOVECOT_VERSION instead of PACKAGE_VERSION.
Timo Sirainen <tss@iki.fi>
parents: 10582
diff changeset
10 const char *acl_plugin_version = DOVECOT_VERSION;
5185
24f4a959a24c Added <plugin_name>_version string.
Timo Sirainen <tss@iki.fi>
parents: 4964
diff changeset
11
10412
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
12 static struct mail_storage_hooks acl_mail_storage_hooks = {
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
13 .mail_user_created = acl_mail_user_created,
11944
2311b5ca4d3f acl: Override mailbox list functions in mailbox_list_created hook.
Timo Sirainen <tss@iki.fi>
parents: 11488
diff changeset
14 .mailbox_list_created = acl_mailbox_list_created,
10515
8e9e67a94e16 plugins: Simplified code by using mailbox_allocated hook.
Timo Sirainen <tss@iki.fi>
parents: 10484
diff changeset
15 .mail_namespace_storage_added = acl_mail_namespace_storage_added,
11488
4b20e692c606 lib-storage: Plugin API changed to run plugin functions in correct order.
Timo Sirainen <tss@iki.fi>
parents: 10646
diff changeset
16 .mailbox_allocated = acl_mailbox_allocated,
4b20e692c606 lib-storage: Plugin API changed to run plugin functions in correct order.
Timo Sirainen <tss@iki.fi>
parents: 10646
diff changeset
17 .mail_allocated = acl_mail_allocated
10412
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
18 };
8433
dfe39e9a9e78 Initial support for LISTing users with shared mailboxes.
Timo Sirainen <tss@iki.fi>
parents: 8404
diff changeset
19
10412
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
20 void acl_plugin_init(struct module *module)
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
21 {
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
22 mail_storage_hooks_add(module, &acl_mail_storage_hooks);
4077
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
23 }
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
24
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
25 void acl_plugin_deinit(void)
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
26 {
10412
a9eda7672869 lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents: 9004
diff changeset
27 mail_storage_hooks_remove(&acl_mail_storage_hooks);
4077
73573b9ecb00 Added initial support for ACLs. Currently supports reading the ACLs from files. Since no proper support for shared folders exist yet, this is mostly intended to be used only for preventing users from fully accessing the mailboxes they'd otherwise have full access to. It anyway does support "master user" having different ACLs to mailboxes.
Timo Sirainen <timo.sirainen@movial.fi>
parents:
diff changeset
28 }