Mercurial > dovecot > core-2.2
annotate src/plugins/acl/acl-plugin.c @ 10484:43895027cab9 HEAD
plugins: Use mail_namespace_storage_added hook instead of mailbox_list_created.
In mailbox_list_created the storage hasn't yet overridden the list functions.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 14 Dec 2009 14:32:01 -0500 |
parents | a9eda7672869 |
children | 8e9e67a94e16 |
rev | line source |
---|---|
8590
b9faf4db2a9f
Updated copyright notices to include year 2009.
Timo Sirainen <tss@iki.fi>
parents:
8433
diff
changeset
|
1 /* Copyright (c) 2005-2009 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 |
5185
24f4a959a24c
Added <plugin_name>_version string.
Timo Sirainen <tss@iki.fi>
parents:
4964
diff
changeset
|
10 const char *acl_plugin_version = PACKAGE_VERSION; |
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, |
a9eda7672869
lib-storage: Plugin hook API changed to support per-user plugins within a process.
Timo Sirainen <tss@iki.fi>
parents:
9004
diff
changeset
|
14 .mail_storage_created = acl_mail_storage_created, |
10484
43895027cab9
plugins: Use mail_namespace_storage_added hook instead of mailbox_list_created.
Timo Sirainen <tss@iki.fi>
parents:
10412
diff
changeset
|
15 .mail_namespace_storage_added = acl_mail_namespace_storage_added |
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
|
16 }; |
8433
dfe39e9a9e78
Initial support for LISTing users with shared mailboxes.
Timo Sirainen <tss@iki.fi>
parents:
8404
diff
changeset
|
17 |
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 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
|
19 { |
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 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
|
21 } |
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 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
|
24 { |
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
|
25 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
|
26 } |