From 7694b307b82d58bd6b08876c432e196baea5d0dc Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 22 Mar 2026 15:54:48 +0000 Subject: WIP: always use openat why would i write a secure mktemp to be used on linux from 1999????? Signed-off-by: Leah Rowe --- util/nvmutil/include/common.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'util/nvmutil/include') diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h index cec06b25..48de3b97 100644 --- a/util/nvmutil/include/common.h +++ b/util/nvmutil/include/common.h @@ -69,13 +69,6 @@ int fchmod(int fd, mode_t mode); #define OFF_RESET 1 #endif -/* by default: allow use - of openat in hardened mkstemp - */ -#ifndef DISABLE_OPENAT -#define DISABLE_OPENAT 0 /* change to 1 if you don't have openat (old unix) */ -#endif - #ifndef S_ISVTX #define S_ISVTX 01000 #endif @@ -482,17 +475,9 @@ const char *getnvmprogname(void); char *new_tmpfile(int *fd, int local, const char *path); char *new_tmplate(int *fd, int local, const char *path); -#if !(defined(DISABLE_OPENAT) && \ - ((DISABLE_OPENAT) > 0)) /* for openat dir replacement mitigation - in mkhtemp() - */ int mkhtemp(int *fd, struct stat *st, char *template, int dirfd, const char *fname, struct stat *st_dir_initial); -#else -int mkhtemp(int *fd, struct stat *st, - char *template); -#endif int world_writeable_and_sticky(const char *s, int sticky_allowed, int always_sticky); int same_dir(const char *a, const char *b); -- cgit v1.2.1