summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index a80d6a161a..91c3d59d2b 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -348,11 +348,25 @@ static int manager_default_environment(Manager *m) {
/* Import locale variables LC_*= from configuration */
locale_setup(&m->environment);
- } else
+ } else {
/* The user manager passes its own environment
* along to its children. */
m->environment = strv_copy(environ);
+ /* Let's remove some environment variables that we
+ * need ourselves to communicate with our clients */
+ strv_env_unset_many(
+ m->environment,
+ "NOTIFY_SOCKET",
+ "MAINPID",
+ "MANAGERPID",
+ "LISTEN_PID",
+ "LISTEN_FDS",
+ "WATCHDOG_PID",
+ "WATCHDOG_USEC",
+ NULL);
+ }
+
if (!m->environment)
return -ENOMEM;