Skip to content
Snippets Groups Projects
Commit 6cafb3eb authored by Timo Sirainen's avatar Timo Sirainen
Browse files

managesieve-login: Don't read config file when running "doveconf -d"

parent 54624fc3
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ static void capability_parse(const char *cap_string)
capability_store(cap_type, str_c(part));
}
static bool capability_dump(void)
static bool capability_dump(bool dump_defaults)
{
char buf[4096];
int fd[2], status = 0;
......@@ -152,9 +152,14 @@ static bool capability_dump(void)
argv[0] = PKG_LIBEXECDIR"/managesieve";
argv[1] = "-k";
argv[2] = "-c";
argv[3] = master_service_get_config_path(master_service);
argv[4] = NULL;
if (!dump_defaults) {
argv[2] = "-c";
argv[3] = master_service_get_config_path(master_service);
argv[4] = NULL;
} else {
argv[2] = "-O";
argv[3] = NULL;
}
execv_const(argv[0], argv);
i_fatal("managesieve-login: "
......@@ -234,7 +239,7 @@ static void
managesieve_login_config_parser_begin(struct config_parser_context *ctx)
{
if (!capability_dumped) {
(void)capability_dump();
(void)capability_dump(ctx->dump_defaults);
capability_dumped = TRUE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.