dovecot-2.0: acl: Log mailbox names that are skipped due to miss...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 15 17:14:31 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/b0e4edc4d79a
changeset: 12274:b0e4edc4d79a
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 15 15:13:59 2010 +0100
description:
acl: Log mailbox names that are skipped due to missing lookup right with mail_debug=yes
diffstat:
src/plugins/acl/acl-mailbox-list.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r b277b71fb57f -r b0e4edc4d79a src/plugins/acl/acl-mailbox-list.c
--- a/src/plugins/acl/acl-mailbox-list.c Fri Oct 15 15:09:18 2010 +0100
+++ b/src/plugins/acl/acl-mailbox-list.c Fri Oct 15 15:13:59 2010 +0100
@@ -202,15 +202,18 @@
struct acl_mailbox_list *alist = ACL_LIST_CONTEXT(ctx->ctx.list);
const struct mailbox_info *info;
- do {
- info = alist->module_ctx.super.iter_next(ctx->super_ctx);
- if (info == NULL)
- return NULL;
+ while ((info = alist->module_ctx.super.iter_next(ctx->super_ctx)) != NULL) {
/* if we've a list of mailboxes with LOOKUP rights, skip the
mailboxes not in the list (since we know they can't be
visible to us). */
- } while (ctx->lookup_boxes != NULL &&
- mailbox_tree_lookup(ctx->lookup_boxes, info->name) == NULL);
+ if (ctx->lookup_boxes == NULL ||
+ mailbox_tree_lookup(ctx->lookup_boxes, info->name) != NULL)
+ break;
+ if (ctx->ctx.list->ns->user->mail_debug) {
+ i_debug("acl: Mailbox not in dovecot-acl-list: %s",
+ info->name);
+ }
+ }
return info;
}
@@ -378,6 +381,10 @@
return NULL;
}
/* skip to next one */
+ if (ctx->ctx.list->ns->user->mail_debug) {
+ i_debug("acl: No lookup right to mailbox: %s",
+ info->name);
+ }
}
return info == NULL ? NULL : &ctx->info;
}
More information about the dovecot-cvs
mailing list