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.
This commit is contained in:
Lennart Poettering 2020-07-23 08:48:56 +02:00
parent b226422cd7
commit 8047ac8fdc
1 changed files with 5 additions and 0 deletions

View File

@ -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);