]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
master: Append to existing DOVECOT_PRESERVE_ENVS instead of overwriting it
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 7 Jun 2017 21:20:38 +0000 (00:20 +0300)
committerGitLab <gitlab@git.dovecot.net>
Sat, 10 Jun 2017 08:35:40 +0000 (11:35 +0300)
src/master/main.c

index 9bab46402d69131d2586b482c766c87b0399f3d0..0ce87462dd0b19f79be2c04e31460d120ab24850 100644 (file)
@@ -431,6 +431,11 @@ master_set_import_environment(const struct master_service_settings *set)
                return;
 
        t_array_init(&keys, 8);
+       /* preserve existing DOVECOT_PRESERVE_ENVS */
+       value = getenv(DOVECOT_PRESERVE_ENVS_ENV);
+       if (value != NULL)
+               array_append(&keys, &value, 1);
+       /* add new environments */
        envs = t_strsplit_spaces(set->import_environment, " ");
        for (; *envs != NULL; envs++) {
                value = strchr(*envs, '=');