From 9f520df82be412c90dfbe8d7b43982302ab9d991 Mon Sep 17 00:00:00 2001 From: emma Date: Wed, 28 Aug 2024 00:31:02 -0600 Subject: [PATCH] strcmp(1): adds null unveil --- src/strcmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;