diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-07-04 15:36:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-07-20 16:57:35 +0200 |
commit | 399222176728f6d1b4eacc501c2a6b54a6a76190 (patch) | |
tree | a496f991c0c00fe6d0ecec6e30e2b9b6fc294d07 | |
parent | pid1: tell PAM/NSS modules why we are calling them (diff) | |
download | systemd-399222176728f6d1b4eacc501c2a6b54a6a76190.tar.xz systemd-399222176728f6d1b4eacc501c2a6b54a6a76190.zip |
doc: document the two new env vars set by the service manager
-rw-r--r-- | doc/ENVIRONMENT.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/ENVIRONMENT.md b/doc/ENVIRONMENT.md index 641a03d5d7..c69bf9b664 100644 --- a/doc/ENVIRONMENT.md +++ b/doc/ENVIRONMENT.md @@ -101,3 +101,21 @@ systemd-timedated: NTP client services. If set, `timedatectl set-ntp on` enables and starts the first existing unit listed in the environment variable, and `timedatectl set-ntp off` disables and stops all listed units. + +systemd itself: + +* `$SYSTEMD_ACTIVATION_UNIT` — set for all NSS and PAM module invocations that + are done by the service manager on behalf of a specific unit, in child + processes that are later (after execve()) going to become unit + processes. Contains the full unit name (e.g. "foobar.service"). NSS and PAM + modules can use this information to determine in which context and on whose + behalf they are being called, which may be useful to avoid deadlocks, for + example to bypass IPC calls to the very service that is about to be + started. Note that NSS and PAM modules should be careful to only rely on this + data when invoked privileged, or possibly only when getppid() returns 1, as + setting environment variables is of course possible in any even unprivileged + contexts. + +* `$SYSTEMD_ACTIVATION_SCOPE` — closely related to `$SYSTEMD_ACTIVATION_UNIT`, + it is either set to `system` or `user` depending on whether the NSS/PAM + module is called by systemd in `--system` or `--user` mode. |