summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/readpassphrase.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/readpassphrase.c')
-rw-r--r--lib/libc/gen/readpassphrase.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c
index d57e703..86c7811 100644
--- a/lib/libc/gen/readpassphrase.c
+++ b/lib/libc/gen/readpassphrase.c
@@ -68,7 +68,7 @@ restart:
* stdin and write to stderr unless a tty is required.
*/
if ((flags & RPP_STDIN) ||
- (input = output = _open(_PATH_TTY, O_RDWR)) == -1) {
+ (input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) {
if (flags & RPP_REQUIRE_TTY) {
errno = ENOTTY;
return(NULL);
OpenPOWER on IntegriCloud