]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master, master: Make sure master process never tries to read config socket at...
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Fri, 9 Dec 2022 21:21:25 +0000 (23:21 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 27 Jan 2023 13:01:47 +0000 (13:01 +0000)
If the config socket exists, it's a leftover from an older dovecot and
shouldn't be trusted.

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

index 5e8a72b19254bfb83475c8bee3a67a4de262a75c..c4474d87fc9a3ecd3802dfdaf1fc2954602ff1d1 100644 (file)
@@ -315,6 +315,7 @@ master_service_open_config(struct master_service *service,
 
        if (!service->config_path_from_master &&
            !service->config_path_changed_with_param &&
+           !input->always_exec &&
            input->config_path == NULL) {
                /* first try to connect to the default config socket.
                   configuration may contain secrets, so in default config
index d99fa5da146476224a40c9d842d3baea9d7b1f30..f8678c8fd5fe33e0d7af769588286fa0c80e883c 100644 (file)
@@ -39,6 +39,7 @@ struct master_service_settings_input {
        bool preserve_user;
        bool preserve_home;
        bool never_exec;
+       bool always_exec;
        bool use_sysexits;
        bool parse_full_config;
 
index 4cd561c900fed3b389776e02308072d297271cbf..e12b694e32bc2c325c3597b5b3493742353d00b6 100644 (file)
@@ -500,6 +500,7 @@ static struct master_settings *master_settings_read(void)
        input.module = "master";
        input.parse_full_config = TRUE;
        input.preserve_environment = TRUE;
+       input.always_exec = TRUE;
        if (master_service_settings_read(master_service, &input, &output,
                                         &error) < 0)
                i_fatal("Error reading configuration: %s", error);