From a4fe1bfa4d6782c90a878380f4a3152f5c0f7924 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 2 Mar 2026 17:01:41 +0000 Subject: util/nvmutil: call block_unveil earlier Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'util/nvmutil/nvmutil.c') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 153ac2be..a63bc572 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -90,12 +90,10 @@ main(int argc, char *argv[]) #ifdef __OpenBSD__ if (flags == O_RDONLY) err_if(pledge("stdio rpath unveil", NULL) == -1); + block_unveil(); #endif checkdir("/dev/urandom"); checkdir(fname); -#ifdef __OpenBSD__ - block_unveil(); -#endif xopen(rfd, "/dev/urandom", O_RDONLY); openGbeFile(fname); #ifdef __OpenBSD__ -- cgit v1.2.1