execute: Add new PassEnvironment= directive
authorFilipe Brandenburger <filbranden@google.com>
Mon, 7 Sep 2015 06:06:53 +0000 (23:06 -0700)
committerFilipe Brandenburger <filbranden@google.com>
Wed, 11 Nov 2015 15:55:23 +0000 (07:55 -0800)
commitb4c14404b3e8753c41bac0b1d49369230a15c544
tree88670a957a28cb72ab7eedb70c178b2a2aab7041
parent3116c225d2e3c0d8e6b3f4d4a9b48443cc7baf2d
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`.
13 files changed:
TODO
man/systemd.exec.xml
shell-completion/bash/systemd-run
shell-completion/zsh/_systemd-run
src/basic/env-util.c
src/basic/env-util.h
src/core/dbus-execute.c
src/core/execute.c
src/core/execute.h
src/core/load-fragment-gperf.gperf.m4
src/core/load-fragment.c
src/core/load-fragment.h
src/shared/bus-util.c