From 81f9804b6e846ae3679bbb8c6bb3aee2a1dc70ea Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Tue, 10 Mar 2026 05:28:31 +0000 Subject: use the "e" flag with fopen() for O_CLOEXEC; ok tb --- src/lib/libcrypto/ui/ui_openssl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/ui/ui_openssl.c b/src/lib/libcrypto/ui/ui_openssl.c index 3ace3a4e75..26d3e44f69 100644 --- a/src/lib/libcrypto/ui/ui_openssl.c +++ b/src/lib/libcrypto/ui/ui_openssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ui_openssl.c,v 1.29 2025/03/09 15:25:53 tb Exp $ */ +/* $OpenBSD: ui_openssl.c,v 1.30 2026/03/10 05:28:31 deraadt Exp $ */ /* Written by Richard Levitte (richard@levitte.org) and others * for the OpenSSL project 2001. */ @@ -300,9 +300,9 @@ open_console(UI *ui) is_a_tty = 1; #define DEV_TTY "/dev/tty" - if ((tty_in = fopen(DEV_TTY, "r")) == NULL) + if ((tty_in = fopen(DEV_TTY, "re")) == NULL) tty_in = stdin; - if ((tty_out = fopen(DEV_TTY, "w")) == NULL) + if ((tty_out = fopen(DEV_TTY, "we")) == NULL) tty_out = stderr; if (tcgetattr(fileno(tty_in), &tty_orig) == -1) { -- cgit v1.2.3-55-g6feb