Skip to content

Commit

Permalink
lib-storage: Add NO-FS-VALIDATION flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and sirainen committed Feb 24, 2018
1 parent 20856c6 commit 655fc45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib-storage/mailbox-list.c
Expand Up @@ -373,6 +373,9 @@ mailbox_list_settings_parse_full(struct mail_user *user, const char *data,
} else if (strcmp(key, "NO-NOSELECT") == 0) {
set_r->no_noselect = TRUE;
continue;
} else if (strcmp(key, "NO-FS-VALIDATION") == 0) {
set_r->no_fs_validation = TRUE;
continue;
} else {
*error_r = t_strdup_printf("Unknown setting: %s", key);
return -1;
Expand Down Expand Up @@ -1287,7 +1290,8 @@ mailbox_list_is_valid_fs_name(struct mailbox_list *list, const char *name,

*error_r = NULL;

if (list->mail_set->mail_full_filesystem_access)
if (list->mail_set->mail_full_filesystem_access ||
list->set.no_fs_validation)
return TRUE;

/* either the list backend uses '/' as the hierarchy separator or
Expand Down
2 changes: 2 additions & 0 deletions src/lib-storage/mailbox-list.h
Expand Up @@ -160,6 +160,8 @@ struct mailbox_list_settings {
bool iter_from_index_dir;
/* Avoid creating or listing \NoSelect mailboxes. */
bool no_noselect;
/* Do not validate names as fs names (allows weird names) */
bool no_fs_validation;
};

struct mailbox_permissions {
Expand Down

0 comments on commit 655fc45

Please sign in to comment.