]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: If executing doveconf, use master_service_settings_input.service for...
authorTimo Sirainen <tss@iki.fi>
Wed, 13 May 2015 12:47:14 +0000 (15:47 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 13 May 2015 12:47:14 +0000 (15:47 +0300)
Instead of hardcoding to the master_service->name, which may be different.
This fixes reading protocol sieve {} settings when if managesieve was
reading settings via doveconf (= executed from command line).

src/lib-master/master-service-settings.c

index 8062915dc032387a06df8e294bf2f6b8f7583102..cca1d2921ca83b8818ee53157b6247562ce84555 100644 (file)
@@ -119,8 +119,10 @@ master_service_exec_config(struct master_service *service,
        argv_max_count = 11 + (service->argc + 1) + 1;
        conf_argv = t_new(const char *, argv_max_count);
        conf_argv[i++] = DOVECOT_CONFIG_BIN_PATH;
-       conf_argv[i++] = "-f";
-       conf_argv[i++] = t_strconcat("service=", service->name, NULL);
+       if (input->service != NULL) {
+               conf_argv[i++] = "-f";
+               conf_argv[i++] = t_strconcat("service=", input->service, NULL);
+       }
        conf_argv[i++] = "-c";
        conf_argv[i++] = service->config_path;
        if (input->module != NULL) {