]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mailbox list indexes: Disable index files for shared/public namespaces.
authorTimo Sirainen <tss@iki.fi>
Sun, 2 Oct 2011 13:59:51 +0000 (16:59 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 2 Oct 2011 13:59:51 +0000 (16:59 +0300)
src/lib-storage/list/index-mailbox-list.c

index c912eb29e628de592b43c4d422127fbc9ea87d29..b262bd75f7fdcc5dc37bc9d5f702d668a94c8899 100644 (file)
@@ -807,8 +807,15 @@ static void index_mailbox_list_created(struct mailbox_list *list)
                MODULE_CONTEXT_SET(list, index_mailbox_list_module, ilist);
                return;
        }
-       if (*dir == '\0')
+       if (*dir == '\0') {
+               /* in-memory indexes */
                dir = NULL;
+       } else if (list->ns->type != NAMESPACE_PRIVATE) {
+               /* don't create index files for shared/public mailboxes.
+                  their indexes may be shared between multiple users,
+                  each of which may have different ACLs */
+               dir = NULL;
+       }
 
        ilist = p_new(list->pool, struct index_mailbox_list, 1);
        ilist->module_ctx.super = list->v;