dovecot-1.2: acl: Don't use INBOX's ACLs as default ACLs if thei...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jul 23 23:04:22 EEST 2010
details: http://hg.dovecot.org/dovecot-1.2/rev/aae3b2a12cd0
changeset: 9591:aae3b2a12cd0
user: Timo Sirainen <tss at iki.fi>
date: Fri Jul 23 21:04:17 2010 +0100
description:
acl: Don't use INBOX's ACLs as default ACLs if their paths are the same.
diffstat:
src/plugins/acl/acl-backend-vfile.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r f8c14abf52b4 -r aae3b2a12cd0 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c Wed Jul 14 13:53:34 2010 +0100
+++ b/src/plugins/acl/acl-backend-vfile.c Fri Jul 23 21:04:17 2010 +0100
@@ -125,7 +125,7 @@
static const char *
acl_backend_vfile_get_local_dir(struct mail_storage *storage, const char *name)
{
- const char *dir;
+ const char *dir, *inbox;
bool is_file;
dir = mail_storage_get_mailbox_path(storage, name, &is_file);
@@ -133,6 +133,16 @@
dir = mailbox_list_get_path(storage->list, name,
MAILBOX_LIST_PATH_TYPE_CONTROL);
}
+ if (*name == '\0') {
+ /* verify that the directory isn't same as INBOX's directory.
+ this is mainly for Maildir. */
+ inbox = mailbox_list_get_path(storage->list, "INBOX",
+ MAILBOX_LIST_PATH_TYPE_MAILBOX);
+ if (strcmp(inbox, dir) == 0) {
+ /* can't have default ACLs with this setup */
+ return NULL;
+ }
+ }
return dir;
}
More information about the dovecot-cvs
mailing list