diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-07-23 08:48:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-07-23 18:30:15 +0200 |
commit | 8047ac8fdcc7a922834837f7df122b6e36df6e4b (patch) | |
tree | f8218c860d66728f02c981018ddde173a2a8adf0 | |
parent | firstboot: don't create /etc/passwd with mode 000 (diff) | |
download | systemd-8047ac8fdcc7a922834837f7df122b6e36df6e4b.tar.xz systemd-8047ac8fdcc7a922834837f7df122b6e36df6e4b.zip |
core: clean more env vars from env block pid1 receives
We generally clean all env vars we use ourselves to communicate with out
childrens. We forgot some more recent additions however. Let's correct
that.
-rw-r--r-- | src/core/manager.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 54c6321870..41e0d73736 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -589,6 +589,8 @@ static char** sanitize_environment(char **l) { /* Let's remove some environment variables that we need ourselves to communicate with our clients */ strv_env_unset_many( l, + "CACHE_DIRECTORY", + "CONFIGURATION_DIRECTORY", "EXIT_CODE", "EXIT_STATUS", "INVOCATION_ID", @@ -596,13 +598,16 @@ static char** sanitize_environment(char **l) { "LISTEN_FDNAMES", "LISTEN_FDS", "LISTEN_PID", + "LOGS_DIRECTORY", "MAINPID", "MANAGERPID", "NOTIFY_SOCKET", "PIDFILE", "REMOTE_ADDR", "REMOTE_PORT", + "RUNTIME_DIRECTORY", "SERVICE_RESULT", + "STATE_DIRECTORY", "WATCHDOG_PID", "WATCHDOG_USEC", NULL); |