dovecot-2.1: acl: Don't crash in mailbox listing when using auto...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 16 20:04:13 EET 2012
details: http://hg.dovecot.org/dovecot-2.1/rev/ff117a044e20
changeset: 14162:ff117a044e20
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 16 20:04:01 2012 +0200
description:
acl: Don't crash in mailbox listing when using autocreated mailboxes.
diffstat:
src/plugins/acl/acl-mailbox-list.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r aa2e89c9876b -r ff117a044e20 src/plugins/acl/acl-mailbox-list.c
--- a/src/plugins/acl/acl-mailbox-list.c Thu Feb 16 19:16:54 2012 +0200
+++ b/src/plugins/acl/acl-mailbox-list.c Thu Feb 16 20:04:01 2012 +0200
@@ -21,7 +21,6 @@
struct mailbox_tree_context *lookup_boxes;
struct mailbox_info info;
- struct imap_match_glob *glob;
char sep;
unsigned int simple_star_glob:1;
};
@@ -175,8 +174,8 @@
inboxcase = (list->ns->flags & NAMESPACE_FLAG_INBOX_USER) != 0;
ctx->sep = mail_namespace_get_sep(list->ns);
- ctx->glob = imap_match_init_multiple(pool, patterns,
- inboxcase, ctx->sep);
+ ctx->ctx.glob = imap_match_init_multiple(pool, patterns,
+ inboxcase, ctx->sep);
/* see if all patterns have only a single '*' and it's at the end.
we can use it to do some optimizations. */
ctx->simple_star_glob = TRUE;
@@ -249,7 +248,7 @@
this by simply checking if name/child mailbox matches. */
child = t_strdup_printf("%s%cx", ctx->info.name, ctx->sep);
return ctx->simple_star_glob &&
- imap_match(ctx->glob, child) == IMAP_MATCH_YES;
+ imap_match(ctx->ctx.glob, child) == IMAP_MATCH_YES;
}
static bool
@@ -299,7 +298,7 @@
MAILBOX_LIST_ITER_RETURN_NO_FLAGS);
while ((info = mailbox_list_iter_next(iter)) != NULL) {
if (only_nonpatterns &&
- imap_match(ctx->glob, info->name) == IMAP_MATCH_YES) {
+ imap_match(ctx->ctx.glob, info->name) == IMAP_MATCH_YES) {
/* at least one child matches also the original list
patterns. we don't need to show this mailbox. */
ret = FALSE;
More information about the dovecot-cvs
mailing list