Skip to content

Commit

Permalink
lib-storage: Fix ACL in parent mailbox potentially hiding its children.
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, so only it was broken if the parent mailbox wasn't
visible but its children were.
  • Loading branch information
sirainen authored and GitLab committed May 30, 2017
1 parent 9934242 commit 3c56ce9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib-storage/list/mailbox-list-fs-iter.c
Expand Up @@ -75,8 +75,12 @@ fs_get_existence_info_flag(struct fs_list_iterate_context *ctx,
}
switch (existence) {
case MAILBOX_EXISTENCE_NONE:
*info_flags |= MAILBOX_NONEXISTENT;
break;
/* We already found out that this mailbox exists. So this is
either a race condition or ACL plugin prevented access to
this. In any case treat this as a \NoSelect mailbox so that
we'll recurse into its potential children. This is
especially important if ACL disabled access to the parent
mailbox, but child mailboxes would be accessible. */
case MAILBOX_EXISTENCE_NOSELECT:
*info_flags |= MAILBOX_NOSELECT;
break;
Expand Down

0 comments on commit 3c56ce9

Please sign in to comment.