From 2c21a04741eed260570c7ed3ded08c639e65a689 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 24 Mar 2026 02:41:26 +0000 Subject: util/mkhtemp: show path on error accessing it a bit naughty the way i do it, but it works. without this, the message gets clobbered by EINVAL due to a bad call to vprintf in the err function. in this way, we ensure that there is a path, and thus the errno does not get clobbered. i also removed the EPERM setting in the env_tmpdir function, which also clobbered errno. with this fix, if TMPDIR is set but invalid, it should now show the error reliably. Signed-off-by: Leah Rowe --- util/libreboot-utils/include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/libreboot-utils/include/common.h') diff --git a/util/libreboot-utils/include/common.h b/util/libreboot-utils/include/common.h index 5d6405bc..fa07da7f 100644 --- a/util/libreboot-utils/include/common.h +++ b/util/libreboot-utils/include/common.h @@ -517,7 +517,7 @@ int world_writeable_and_sticky(const char *s, int same_dir(const char *a, const char *b); int tmpdir_policy(const char *path, int *allow_noworld_unsticky); -char *env_tmpdir(int always_sticky); +char *env_tmpdir(int always_sticky, char **tmpdir); int secure_file(int *fd, struct stat *st, struct stat *expected, -- cgit v1.2.1