]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 14 Sep 2017 09:14:47 +0000 (12:14 +0300)
src/master/main.c

index c0d75e0cb15ddf912c7e0bb3d9b3437e52bfbdaa..bfb608349ba52bcae73d3ca4c0d8a9605f7b128a 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, '=');