summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-02 16:41:06 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-02 16:41:06 +0000
commit0106c3821743e0772ea08958a56b7505d1fb1e33 (patch)
tree7461550b78706045c37ac56c786dd1ced56055c3 /util
parent58cf5a157929a09ff878f6bc59cc0f2999587d89 (diff)
util/nvmutil: unveil /dev/urandom much earlier
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index ecd104be..7a8c02f0 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -81,6 +81,7 @@ main(int argc, char *argv[])
{
#ifdef __OpenBSD__
err_if(pledge("stdio rpath wpath unveil", NULL) == -1);
+ err_if(unveil("/dev/urandom", "r") == -1);
#endif
if (argc < 2)
usage(argv[0]);
@@ -90,7 +91,6 @@ main(int argc, char *argv[])
checkdir("/dev/urandom");
checkdir(fname);
#ifdef __OpenBSD__
- err_if(unveil("/dev/urandom", "r") == -1);
block_unveil();
#endif
xopen(rfd, "/dev/urandom", O_RDONLY);