From 50300f846fc1861efe01c104a7ce9c483e3afcf1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 19 Mar 2026 08:07:47 +0000 Subject: 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 --- util/nvmutil/include/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/nvmutil/include/common.h') 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); -- cgit v1.2.1