Mercurial > dovecot > original-hg > dovecot-1.2
diff src/plugins/acl/acl-plugin.c @ 4077:73573b9ecb00 HEAD
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.
author | Timo Sirainen <timo.sirainen@movial.fi> |
---|---|
date | Mon, 27 Feb 2006 18:30:39 +0200 |
parents | |
children | 93bc9770f938 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/plugins/acl/acl-plugin.c Mon Feb 27 18:30:39 2006 +0200 @@ -0,0 +1,30 @@ +/* Copyright (C) 2005 Timo Sirainen */ + +#include "lib.h" +#include "mail-storage.h" +#include "acl-api.h" +#include "acl-plugin.h" + +#include <stdlib.h> + +/* defined by imap, pop3, lda */ +extern void (*hook_mail_storage_created)(struct mail_storage *storage); + +void (*acl_next_hook_mail_storage_created)(struct mail_storage *storage); + +void acl_plugin_init(void) +{ + if (getenv("ACL") != NULL) { + acl_next_hook_mail_storage_created = + hook_mail_storage_created; + hook_mail_storage_created = acl_mail_storage_created; + } +} + +void acl_plugin_deinit(void) +{ + if (acl_next_hook_mail_storage_created != NULL) { + hook_mail_storage_created = + acl_next_hook_mail_storage_created; + } +}