Mercurial > dovecot > core-2.2
annotate src/plugins/acl/acl-backend-vfile.h @ 12777:988e363ac17d
acl: Added acl_backend_nonowner_lookups_rebuild()
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 04 Mar 2011 18:08:30 +0200 |
parents | db0072f7c6b4 |
children | a097ef0a9d6d |
rev | line source |
---|---|
6410
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
5552
diff
changeset
|
1 #ifndef ACL_BACKEND_VFILE_H |
e4eb71ae8e96
Changed .h ifdef/defines to use <NAME>_H format.
Timo Sirainen <tss@iki.fi>
parents:
5552
diff
changeset
|
2 #define ACL_BACKEND_VFILE_H |
5552
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
3 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
4 #include "acl-api-private.h" |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
5 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
6 #define ACL_FILENAME "dovecot-acl" |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
7 #define ACLLIST_FILENAME "dovecot-acl-list" |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
8 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
9 struct acl_object_vfile { |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
10 struct acl_object aclobj; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
11 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
12 pool_t rights_pool; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
13 ARRAY_DEFINE(rights, struct acl_rights); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
14 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
15 char *global_path, *local_path; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
16 }; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
17 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
18 struct acl_backend_vfile_acllist { |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
19 time_t mtime; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
20 const char *name; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
21 }; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
22 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
23 struct acl_backend_vfile { |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
24 struct acl_backend backend; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
25 const char *global_dir; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
26 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
27 pool_t acllist_pool; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
28 ARRAY_DEFINE(acllist, struct acl_backend_vfile_acllist); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
29 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
30 time_t acllist_last_check; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
31 time_t acllist_mtime; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
32 unsigned int acllist_change_counter; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
33 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
34 unsigned int cache_secs; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
35 unsigned int rebuilding_acllist:1; |
8896
db0072f7c6b4
acl: Fixed crash when rebuilding dovecot-acl-list file.
Timo Sirainen <tss@iki.fi>
parents:
6410
diff
changeset
|
36 unsigned int iterating_acllist:1; |
5552
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
37 }; |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
38 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
39 void acl_backend_vfile_acllist_refresh(struct acl_backend_vfile *backend); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
40 int acl_backend_vfile_acllist_rebuild(struct acl_backend_vfile *backend); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
41 void acl_backend_vfile_acllist_verify(struct acl_backend_vfile *backend, |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
42 const char *name, time_t mtime); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
43 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
44 struct acl_mailbox_list_context * |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
45 acl_backend_vfile_nonowner_iter_init(struct acl_backend *backend); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
46 int acl_backend_vfile_nonowner_iter_next(struct acl_mailbox_list_context *ctx, |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
47 const char **name_r); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
48 void |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
49 acl_backend_vfile_nonowner_iter_deinit(struct acl_mailbox_list_context *ctx); |
12777
988e363ac17d
acl: Added acl_backend_nonowner_lookups_rebuild()
Timo Sirainen <tss@iki.fi>
parents:
8896
diff
changeset
|
50 int acl_backend_vfile_nonowner_lookups_rebuild(struct acl_backend *backend); |
5552
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
51 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
52 int acl_backend_vfile_object_get_mtime(struct acl_object *aclobj, |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
53 time_t *mtime_r); |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
54 |
71b5fd371b9a
Create dovecot-acl-list file that lists all mailboxes where non-owner has
Timo Sirainen <tss@iki.fi>
parents:
diff
changeset
|
55 #endif |