Skip to content

Commit

Permalink
lib-storage: Fix LAYOUT=fs potentially not ignoring ACLs when requested
Browse files Browse the repository at this point in the history
fs_get_existence_info_flag() was only being called with LAYOUT=fs and
Maildir combination. This mainly affected that combination when using
mailbox_list_index=yes and trying to list mailboxes with ACL checking
disabled.
  • Loading branch information
sirainen authored and GitLab committed May 30, 2017
1 parent 3c56ce9 commit 6263d36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib-storage/list/mailbox-list-fs-iter.c
Expand Up @@ -59,12 +59,15 @@ fs_get_existence_info_flag(struct fs_list_iterate_context *ctx,
enum mailbox_info_flags *info_flags)
{
struct mailbox *box;
enum mailbox_flags flags = 0;
enum mailbox_existence existence;
bool auto_boxes;
int ret;

if ((ctx->ctx.flags & MAILBOX_LIST_ITER_RAW_LIST) != 0)
flags |= MAILBOX_FLAG_IGNORE_ACLS;
auto_boxes = (ctx->ctx.flags & MAILBOX_LIST_ITER_NO_AUTO_BOXES) == 0;
box = mailbox_alloc(ctx->ctx.list, vname, 0);
box = mailbox_alloc(ctx->ctx.list, vname, flags);
ret = mailbox_exists(box, auto_boxes, &existence);
mailbox_free(&box);

Expand Down

0 comments on commit 6263d36

Please sign in to comment.