*output_r = ctx->output;
}
+const char *
+config_export_get_import_environment(struct config_export_context *ctx)
+{
+ enum setting_type stype;
+ unsigned int i;
+
+ for (i = 0; ctx->parsers[i].root != NULL; i++) {
+ if (ctx->parsers[i].root == &master_service_setting_parser_info) {
+ const char *const *value =
+ settings_parse_get_value(ctx->parsers[i].parser,
+ "import_environment", &stype);
+ i_assert(value != NULL);
+ return *value;
+ }
+ }
+ i_unreached();
+}
+
static void config_export_free(struct config_export_context *ctx)
{
if (ctx->dup_parsers != NULL)
const struct config_module_parser *parsers);
void config_export_get_output(struct config_export_context *ctx,
struct master_service_settings_output *output_r);
+const char *
+config_export_get_import_environment(struct config_export_context *ctx);
int config_export_finish(struct config_export_context **ctx);
#endif
Do this only if the environment exists, because
lib-master doesn't set it if it doesn't want the
environment to be cleaned (e.g. -k parameter). */
+ const char *import_environment =
+ config_export_get_import_environment(ctx);
+ master_service_import_environment(import_environment);
master_service_env_clean();
}