summaryrefslogtreecommitdiff
path: root/util/nvmutil/include/common.h
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-19 08:07:47 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-19 08:42:58 +0000
commit50300f846fc1861efe01c104a7ce9c483e3afcf1 (patch)
tree63c8475317f8ec4a47578802ab43bee4b04c609d /util/nvmutil/include/common.h
parent4b35d9ac290efaed02639567f7bc47c739b7c586 (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/common.h')
-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);