summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-02 12:23:36 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-02 12:23:36 +0200
commit9a00f57a5ba7ed431e6bac8d8b36518708503b4e (patch)
treee548891199d5ff830aa74f40cd23e63660dec41a /src/shared/util.c
parentcd4ba18a849dc82735b3787cf99bd3fdc404d5ae (diff)
path: add new "systemd-path" utility for querying paths described in file-hierarchy(7)
This new tool is based on "sd-path", a new (so far unexported) API for libsystemd, that can hopefully grow into a workable API covering /opt and more one day.
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 9b5a47ab6f..a1c8baf237 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5226,8 +5226,8 @@ int get_home_dir(char **_h) {
assert(_h);
/* Take the user specified one */
- e = getenv("HOME");
- if (e) {
+ e = secure_getenv("HOME");
+ if (e && path_is_absolute(e)) {
h = strdup(e);
if (!h)
return -ENOMEM;