From 89d36ea5d5a28c68cca239024df7b94e3a558349 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Thu, 30 Sep 2021 02:35:03 +0000 Subject: pledge(2) hilex --- bin/hilex.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/hilex.c b/bin/hilex.c index 8a06eb36..2289ef95 100644 --- a/bin/hilex.c +++ b/bin/hilex.c @@ -149,6 +149,11 @@ static void ansiHeader(const char *opts[]) { close(rw[0]); close(rw[1]); setlinebuf(stdout); + +#ifdef __OpenBSD__ + error = pledge("stdio", NULL); + if (error) err(EX_OSERR, "pledge"); +#endif } static void ansiFooter(const char *opts[]) { @@ -369,6 +374,16 @@ int main(int argc, char *argv[]) { pager = isatty(STDOUT_FILENO); } +#ifdef __OpenBSD__ + int error; + if (formatter->header == ansiHeader && pager) { + error = pledge("stdio proc exec", NULL); + } else { + error = pledge("stdio", NULL); + } + if (error) err(EX_OSERR, "pledge"); +#endif + if (!name) { if (NULL != (name = strrchr(path, '/'))) { name++; -- cgit 1.4.1 class='sub right'>
summary refs log tree commit diff
path: root/VERSION (unfollow)
Commit message (Collapse)Author
2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe
2021-04-18Import LibreSSL 3.3.2June McEnroe
2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe
2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe
Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck.
2020-12-15Import LibreSSL 3.3.1June McEnroe
2020-11-24Import LibreSSL 3.3.0June McEnroe
2020-10-22Import LibreSSL 3.2.2June McEnroe
2020-09-29Import LibreSSL 3.2.1June McEnroe
2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe
2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe
2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe