summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-02-07 12:31:46 +0000
committerLeah Rowe <leah@libreboot.org>2025-02-07 12:31:46 +0000
commite1e515bd22ad8452e73404d7dc9b291938ae7010 (patch)
treec13e45116fd582c56aaab925447effd28314a9d1
parentada057a865c32f8e11662b59746997ab85fb510d (diff)
util/nvmutil: hardened pledge on help output
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index a28a117e..499ae65e 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -80,6 +80,9 @@ main(int argc, char *argv[])
#endif
if (argc < 2) { /* TODO: manpage! */
+#ifdef __OpenBSD__
+ err_if(pledge("stdio", NULL) == -1);
+#endif
fprintf(stderr, "Modify Intel GbE NVM images e.g. set MAC\n");
fprintf(stderr, "USAGE:\n");
fprintf(stderr, " %s FILE dump\n", argv[0]);