summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-09-24 23:38:05 -0400
committerJune McEnroe <june@causal.agency>2021-09-24 23:38:05 -0400
commitf4c22734ee338f3db4ac3743ec850a4410a95692 (patch)
tree51895e00f2f70b7ecd89f280341376016f8e5e56
parentSet original socket CLOEXEC (diff)
downloadsrc-f4c22734ee338f3db4ac3743ec850a4410a95692.tar.gz
src-f4c22734ee338f3db4ac3743ec850a4410a95692.zip
Pledge downgrade
Diffstat (limited to '')
-rw-r--r--bin/downgrade.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/downgrade.c b/bin/downgrade.c
index ee7c4a7e..d4c5b598 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");