diff --git a/src/npc.c b/src/npc.c index cd488e5..67d7f28 100644 --- a/src/npc.c +++ b/src/npc.c @@ -20,7 +20,7 @@ #include /* fprintf(3), fputs(3), getc(3), perror(3), putc(3), stdin, * stdout, EOF */ #include /* EX_IOERR, EX_OK, EX_OSERR, EX_USAGE */ -#include /* pledge(2), getopt(3) */ +#include /* NULL, getopt(3), pledge(2), unveil(2) */ char *program_name = "npc"; @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) { char showtab = 0; /* prints tab characters in caret notation */ #ifdef __OpenBSD__ - if (pledge("stdio", NULL) == -1) { + if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL)) { perror(argv[0] == NULL ? program_name : argv[0]); return EX_OSERR; }