From 88ff5f7380c3382092217442dcc962fdca59be3a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 24 Mar 2026 19:44:22 +0000 Subject: util/mkhtemp: O_TMPFILE fast path on linux linux itself provides much of the hardening we need, and avoids the need for some of our tests. use this on linux (fall back to openat still, on e.g. bsd) Signed-off-by: Leah Rowe --- util/libreboot-utils/include/common.h | 8 ++++++++ 1 file changed, 8 insertions(+) (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 b78b0c9c..620e95b9 100644 --- a/util/libreboot-utils/include/common.h +++ b/util/libreboot-utils/include/common.h @@ -513,6 +513,14 @@ int mkhtemp_try_create(int dirfd, int *fd, struct stat *st, int type); +int +mkhtemp_tmpfile_linux(int dirfd, + struct stat *st_dir_initial, + char *fname_copy, + char *p, + size_t xc, + int *fd, + struct stat *st); int mkhtemp(int *fd, struct stat *st, char *template, int dirfd, const char *fname, struct stat *st_dir_initial, int type); -- cgit v1.2.1