summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-02-11 23:53:14 +0100
committerLennart Poettering <lennart@poettering.net>2013-02-11 23:54:30 +0100
commit8b55b8c4e7fce5e05dcfd783a37fb843d1bf1868 (patch)
treeb6fb6a85fc1a9103f4d18b09d150e29b04b03d04 /src
parentfabe5c0e5fce730aa66e10a9c4f9fdd443d7aeda (diff)
manager: clean environment before passing it on to others
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index c8d7d70dc4..4bebb2996f 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -71,6 +71,7 @@
#include "path-util.h"
#include "audit-fd.h"
#include "efivars.h"
+#include "env-util.h"
/* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
#define GC_QUEUE_ENTRIES_MAX 16
@@ -289,6 +290,9 @@ static void manager_strip_environment(Manager *m) {
* the initrd interface:
* http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface */
strv_remove_prefix(m->environment, "RD_");
+
+ /* Drop invalid entries */
+ strv_env_clean(m->environment);
}
int manager_new(SystemdRunningAs running_as, Manager **_m) {