summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-12 19:39:56 +0800
committerLennart Poettering <lennart@poettering.net>2014-01-12 19:41:57 +0800
commit43d03a83766a0d63f535e2afa6aeb6e6acbe83b2 (patch)
treea1219f615f91717be4090a891cc03642e804cf1c /src/core/manager.c
parentd44fdf4954e3611e6fcd9b637763664b2574af6e (diff)
core: clean up environment block for --user instances a bit
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;