Mercurial > dovecot > core-2.2
annotate src/plugins/acl/acl-plugin.c @ 22713:cb108f786fb4
Updated copyright notices to include the year 2018.
author | Stephan Bosch <stephan.bosch@dovecot.fi> |
---|---|
date | Mon, 01 Jan 2018 22:42:08 +0100 |
parents | 2e2563132d5f |
children |
rev | line source |
---|---|
22713
cb108f786fb4
Updated copyright notices to include the year 2018.
Stephan Bosch <stephan.bosch@dovecot.fi>
parents:
21390
diff
changeset
|
1 /* Copyright (c) 2005-2018 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 |
15199
73916b7be94e
Plugin ABI version checking improvements.
Timo Sirainen <tss@iki.fi>
parents:
14133
diff
changeset
|
9 const char *acl_plugin_version = DOVECOT_ABI_VERSION; |
5185
24f4a959a24c
Added <plugin_name>_version string.
Timo Sirainen <tss@iki.fi>
parents:
4964
diff
changeset
|
10 |
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
|
11 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
|
12 .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
|
13 .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
|
14 .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
|
15 .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
|
16 .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
|
17 }; |
8433
dfe39e9a9e78
Initial support for LISTing users with shared mailboxes.
Timo Sirainen <tss@iki.fi>
parents:
8404
diff
changeset
|
18 |
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
|
19 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
|
20 { |
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 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
|
22 } |
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 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
|
25 { |
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
|
26 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
|
27 } |