summaryrefslogtreecommitdiff
path: root/util/nvmutil/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-19 08:07:47 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-26 06:59:42 +0000
commit113f2db37cfbb88adf69b0132e8d05e98e333caf (patch)
tree70c767064feb0c1faf22cd0962af2970da28deb7 /util/nvmutil/include
parent7cc584fe0ea785e6d798bc67496324f06da5b01b (diff)
util/nvmutil: hardened mkstemp
200 retries, not 100. and open with O_NOFOLLOW and O_CLOEXEC check X on mkstemp support more than 6 X in mkstemp make PATH_LEN 4096 1024 is a bit low make default mkstemp length 4096 Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/include')
-rw-r--r--util/nvmutil/include/common.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h
index 4173ca6e..8e8ee96c 100644
--- a/util/nvmutil/include/common.h
+++ b/util/nvmutil/include/common.h
@@ -35,7 +35,7 @@ int fchmod(int fd, mode_t mode);
#define MAX_CMD_LEN 50
#ifndef PATH_LEN
-#define PATH_LEN 1024
+#define PATH_LEN 4096
#endif
#define OFF_ERR 0
@@ -421,7 +421,7 @@ const char *getnvmprogname(void);
*/
char *new_tmpfile(int *fd, int local, const char *path);
-int x_i_mkstemp(char *template);
+int mkstemp_n(char *template);
char *x_c_tmpdir(void);
int close_on_eintr(int fd);
int fsync_on_eintr(int fd);