summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-02-11 03:46:08 +0100
committerLennart Poettering <lennart@poettering.net>2013-02-11 03:54:50 +0100
commit4d1a69043862ed979642f5688097160355d4cc81 (patch)
treedeac099c3b4da6740cedac9af10913981303f78b /src/core
parentc62c294fd521e5b65bb52f831773916bbc4cd90a (diff)
env: considerably beef up environment cleaning logic
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
Diffstat (limited to 'src/core')
-rw-r--r--src/core/dbus-manager.c1
-rw-r--r--src/core/execute.c1
-rw-r--r--src/core/service.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index b7829572f5..7071196238 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -36,6 +36,7 @@
#include "path-util.h"
#include "dbus-unit.h"
#include "virt.h"
+#include "env-util.h"
#define BUS_MANAGER_INTERFACE_BEGIN \
" <interface name=\"org.freedesktop.systemd1.Manager\">\n"
diff --git a/src/core/execute.c b/src/core/execute.c
index 1413c9110e..aa58bc488c 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -64,6 +64,7 @@
#include "loopback-setup.h"
#include "path-util.h"
#include "syscall-list.h"
+#include "env-util.h"
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
diff --git a/src/core/service.c b/src/core/service.c
index 914146383c..9c4bc41430 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -42,6 +42,7 @@
#include "path-util.h"
#include "util.h"
#include "utf8.h"
+#include "env-util.h"
#ifdef HAVE_SYSV_COMPAT