summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-24 02:41:26 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-24 02:41:53 +0000
commit2c21a04741eed260570c7ed3ded08c639e65a689 (patch)
tree7f27330a1d7a59f875a4179b7a4d754d5a7da9b2 /util/libreboot-utils/include
parenta5eed39a76e257e4a257ddce89a1bff3618fc12a (diff)
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 <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/include')
-rw-r--r--util/libreboot-utils/include/common.h2
1 files changed, 1 insertions, 1 deletions
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,