From b4c14404b3e8753c41bac0b1d49369230a15c544 Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Sun, 6 Sep 2015 23:06:53 -0700 Subject: execute: Add new PassEnvironment= directive This directive allows passing environment variables from the system manager to spawned services. Variables in the system manager can be set inside a container by passing `--set-env=...` options to systemd-spawn. Tested with an on-disk test.service unit. Tested using multiple variable names on a single line, with an empty setting to clear the current list of variables, with non-existing variables. Tested using `systemd-run -p PassEnvironment=VARNAME` to confirm it works with transient units. Confirmed that `systemctl show` will display the PassEnvironment settings. Checked that man pages are generated correctly. No regressions in `make check`. --- src/core/execute.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/execute.h') diff --git a/src/core/execute.h b/src/core/execute.h index f8995a4203..1faff160cb 100644 --- a/src/core/execute.h +++ b/src/core/execute.h @@ -99,6 +99,7 @@ struct ExecRuntime { struct ExecContext { char **environment; char **environment_files; + char **pass_environment; struct rlimit *rlimit[_RLIMIT_MAX]; char *working_directory, *root_directory; -- cgit v1.2.3-54-g00ecf