From fccb44863b6084dcb323ee1d97682a142e785d50 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 20 Jul 2017 14:19:57 +0200 Subject: [PATCH] sd-path: make sure to use tmp_dir() and var_tmp_dir() (#6397) Let's reuse the common code wherever appropriate. --- src/libsystemd/sd-path/sd-path.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c index 752c1ba56b..6e41dac1ad 100644 --- a/src/libsystemd/sd-path/sd-path.c +++ b/src/libsystemd/sd-path/sd-path.c @@ -23,6 +23,7 @@ #include "architecture.h" #include "fd-util.h" #include "fileio.h" +#include "fs-util.h" #include "missing.h" #include "path-util.h" #include "string-util.h" @@ -219,10 +220,10 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { switch (type) { case SD_PATH_TEMPORARY: - return from_environment("TMPDIR", "/tmp", ret); + return tmp_dir(ret); case SD_PATH_TEMPORARY_LARGE: - return from_environment("TMPDIR", "/var/tmp", ret); + return var_tmp_dir(ret); case SD_PATH_SYSTEM_BINARIES: *ret = "/usr/bin"; -- 2.25.1