/* Copyright (c) 2010-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
+#include "array.h"
#include "process-title.h"
#include "settings.h"
#include "master-service.h"
{
bool ret = FALSE;
- if (*set->doveadm_allowed_commands == '\0')
+ if (array_is_empty(&set->doveadm_allowed_commands))
return TRUE;
T_BEGIN {
const char *const *cmds =
- t_strsplit(set->doveadm_allowed_commands, ",");
+ settings_boollist_get(&set->doveadm_allowed_commands);
for (; *cmds != NULL; cmds++) {
if (strcmp(*cmds, cmd_name) == 0) {
ret = TRUE;
DEF(ENUM, doveadm_ssl),
DEF(STR, doveadm_username),
DEF(STR, doveadm_password),
- DEF(STR, doveadm_allowed_commands),
+ DEF(BOOLLIST, doveadm_allowed_commands),
DEF(STR, dsync_alt_char),
DEF(STR_NOVARS, dsync_remote_cmd),
DEF(STR, doveadm_api_key),
.doveadm_ssl = "no:ssl:starttls",
.doveadm_username = "doveadm",
.doveadm_password = "",
- .doveadm_allowed_commands = "",
+ .doveadm_allowed_commands = ARRAY_INIT,
.dsync_alt_char = "_",
.dsync_remote_cmd = "ssh -l%{login} %{host} doveadm dsync-server -u%u -U",
.dsync_features = "",
const char *doveadm_ssl;
const char *doveadm_username;
const char *doveadm_password;
- const char *doveadm_allowed_commands;
+ ARRAY_TYPE(const_string) doveadm_allowed_commands;
const char *dsync_alt_char;
const char *dsync_remote_cmd;
const char *doveadm_api_key;