]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: We stopped calling hook_mail_storage_created for internal namespaces.
authorTimo Sirainen <tss@iki.fi>
Mon, 2 Feb 2009 03:24:56 +0000 (22:24 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 2 Feb 2009 03:24:56 +0000 (22:24 -0500)
--HG--
branch : HEAD

src/plugins/acl/acl-storage.c

index 8c27dc727f718923b91fbb217aa94c2f9ac9118f..98fb8a5a968b9fc8cb55db44ecc5939811651842 100644 (file)
@@ -174,19 +174,18 @@ void acl_mail_storage_created(struct mail_storage *storage)
 
        if ((storage->ns->flags & NAMESPACE_FLAG_INTERNAL) != 0) {
                /* no ACL checks for internal namespaces (deliver) */
-               return;
-       }
-
-       astorage = p_new(storage->pool, struct acl_mail_storage, 1);
-       astorage->module_ctx.super = storage->v;
-       storage->v.destroy = acl_storage_destroy;
-       storage->v.mailbox_open = acl_mailbox_open;
-       storage->v.mailbox_create = acl_mailbox_create;
+       } else {
+               astorage = p_new(storage->pool, struct acl_mail_storage, 1);
+               astorage->module_ctx.super = storage->v;
+               storage->v.destroy = acl_storage_destroy;
+               storage->v.mailbox_open = acl_mailbox_open;
+               storage->v.mailbox_create = acl_mailbox_create;
 
-       backend = acl_mailbox_list_get_backend(mail_storage_get_list(storage));
-       acl_storage_rights_ctx_init(&astorage->rights, backend);
+               backend = acl_mailbox_list_get_backend(mail_storage_get_list(storage));
+               acl_storage_rights_ctx_init(&astorage->rights, backend);
 
-       MODULE_CONTEXT_SET(storage, acl_storage_module, astorage);
+               MODULE_CONTEXT_SET(storage, acl_storage_module, astorage);
+       }
 
        if (acl_next_hook_mail_storage_created != NULL)
                acl_next_hook_mail_storage_created(storage);