mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
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>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user