From 3f866cec7095cd80307ff0f5203538b49f43cf3f Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 31 Oct 2024 12:42:45 +0100 Subject: Add another pledge(2) location --- src/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 55dd706..18aee07 100644 --- a/src/main.c +++ b/src/main.c @@ -171,9 +171,14 @@ main(int argc, char **argv) (void)fclose(fstream); #else - if (argc == 1) + if (argc == 1) { argv = (static char *[]){"-"}; - else { + /* TODO: Can we test this in an OpenBSD VM? */ +#if 0 && defined(__OpenBSD__) + if (pledge("stdio") == -1) + cerr(EXIT_FATAL, "pledge:"); +#endif + } else { argc--; argv++; flags.do_header = true; -- cgit v1.2.3