diff --git a/src/strcmp.c b/src/strcmp.c index 6d930d5..6eda193 100644 --- a/src/strcmp.c +++ b/src/strcmp.c @@ -20,7 +20,7 @@ #include /* EX_OK, EX_OSERR, EX_USAGE */ #ifdef __OpenBSD__ -# include /* pledge(2) */ +# include /* pledge(2), unveil(2) */ #endif char *program_name = "strcmp"; @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) { unsigned int i; #ifdef __OpenBSD__ - if (pledge("stdio", NULL) == -1) { + if (pledge("stdio unveil", NULL) == -1 || unveil(NULL, NULL) == -1) { perror(argv[0] == NULL ? program_name : argv[0]); return EX_OSERR;