const struct master_service_settings_input *input)
{
const char **conf_argv, *binary_path = service->argv[0];
- const char *home = NULL, *user = NULL, *timestamp = NULL, *error = NULL;
+ const char *error = NULL;
unsigned int i, argv_max_count;
if (!t_binary_abspath(&binary_path, &error)) {
if (!service->keep_environment && !input->preserve_environment) {
if (input->preserve_home)
- home = getenv("HOME");
+ master_service_import_environment("HOME");
if (input->preserve_user)
- user = getenv("USER");
+ master_service_import_environment("USER");
if ((service->flags & MASTER_SERVICE_FLAG_STANDALONE) != 0)
- timestamp = getenv("LOG_STDERR_TIMESTAMP");
+ master_service_import_environment("LOG_STDERR_TIMESTAMP");
master_service_env_clean();
- if (home != NULL)
- env_put(t_strconcat("HOME=", home, NULL));
- if (user != NULL)
- env_put(t_strconcat("USER=", user, NULL));
- if (timestamp != NULL)
- env_put(t_strconcat("LOG_STDERR_TIMESTAMP=", timestamp, NULL));
}
if (input->use_sysexits)
env_put("USE_SYSEXITS=1");