From e1e515bd22ad8452e73404d7dc9b291938ae7010 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 7 Feb 2025 12:31:46 +0000 Subject: util/nvmutil: hardened pledge on help output Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util/nvmutil/nvmutil.c') 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]); -- cgit v1.2.1