mailbox-list.c revision d02d34e138e32b4266f5a403d6c51d7803bf322f
a24665de9d5c773115a5918e60ed587aafe67d5cTimo Sirainen/* Copyright (c) 2006-2007 Dovecot authors, see the included COPYING file */
a24665de9d5c773115a5918e60ed587aafe67d5cTimo Sirainen/* 20 * (200+1) < 4096 which is the standard PATH_MAX. Having these settings
a24665de9d5c773115a5918e60ed587aafe67d5cTimo Sirainen prevents malicious user from creating eg. "a/a/a/.../a" mailbox name and
a24665de9d5c773115a5918e60ed587aafe67d5cTimo Sirainen then start renaming them to larger names from end to beginning, which
a24665de9d5c773115a5918e60ed587aafe67d5cTimo Sirainen eventually would start causing the failures when trying to use too
a24665de9d5c773115a5918e60ed587aafe67d5cTimo Sirainen long mailbox names. */
#define CRITICAL_MSG \
unsigned int i, count;
for (i = 0; i < count; i++) {
*idx_r = i;
return TRUE;
return FALSE;
unsigned int idx;
unsigned int idx;
const char **error_r)
unsigned int idx;
driver);
const char **error_r)
tmp++;
value++;
const char *path;
path);
const char *pattern)
const char *name)
const char *name)
return pattern;
const char *name,
struct mailbox_list_iterate_context *
struct mailbox_list_iterate_context *
const char *const *patterns,
const struct mailbox_info *
const char *name)
t_push();
if (created) {
if (create_flags != 0)
if (!match_parents)
if (p == NULL)
t_pop();
return TRUE;
levels++;
level_len = 0;
level_len++;
return TRUE;
return TRUE;
return FALSE;
#ifdef HAVE_DIRENT_D_TYPE
switch (d->d_type) {
case DT_UNKNOWN:
case DT_REG:
case DT_DIR:
case DT_LNK:
return type;
const char *error_string;
return FALSE;
return TRUE;