summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-07-23 08:48:56 +0200
committerLennart Poettering <lennart@poettering.net>2020-07-23 18:30:15 +0200
commit8047ac8fdcc7a922834837f7df122b6e36df6e4b (patch)
treef8218c860d66728f02c981018ddde173a2a8adf0
parentb226422cd76acb886017d1a84ded990efc192f85 (diff)
downloadsystemd-8047ac8fdcc7a922834837f7df122b6e36df6e4b.tar.gz
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.c5
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);