From 2f6cd6f79992a28b6908b03844050a0bd251b7bf Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 24 Sep 2021 23:38:05 -0400 Subject: Pledge downgrade --- bin/downgrade.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bin') diff --git a/bin/downgrade.c b/bin/downgrade.c index 871b3eb4..31019714 100644 --- a/bin/downgrade.c +++ b/bin/downgrade.c @@ -312,6 +312,11 @@ int main(int argc, char *argv[]) { if (error) errx(EX_PROTOCOL, "tls_handshake: %s", tls_error(client)); tls_config_clear_keys(config); +#ifdef __OpenBSD__ + error = pledge("stdio", NULL); + if (error) err(EX_OSERR, "pledge"); +#endif + #ifdef __FreeBSD__ error = caph_enter() || caph_limit_stdio(); if (error) err(EX_OSERR, "caph_enter"); -- cgit 1.4.1