From f7ed8afaa32cf14a3921e1a6629a45030d317578 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 13 Sep 2005 23:40:08 +0000 Subject: ensure that stdio fds are attached; ok deraadt@ --- usr.bin/ssh/ssh-add.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.bin/ssh/ssh-add.c') diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 0347b3a94bd..a836e32dfa5 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.72 2005/07/17 07:17:55 djm Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.73 2005/09/13 23:40:07 djm Exp $"); #include @@ -312,6 +312,9 @@ main(int argc, char **argv) char *sc_reader_id = NULL; int i, ch, deleting = 0, ret = 0; + /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ + sanitise_stdfd(); + SSLeay_add_all_algorithms(); /* At first, get a connection to the authentication agent. */ -- cgit v1.2.3