diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-24 19:44:22 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-24 19:57:12 +0000 |
| commit | 88ff5f7380c3382092217442dcc962fdca59be3a (patch) | |
| tree | 8ada43324e767f6bd12b14da877079d3d1cb7c1a /util/libreboot-utils/include/common.h | |
| parent | bf5a3df79692fa757d77b9f1280242053541ee6a (diff) | |
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 <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/include/common.h')
| -rw-r--r-- | util/libreboot-utils/include/common.h | 8 |
1 files changed, 8 insertions, 0 deletions
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); |
