=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-add.c,v retrieving revision 1.71.2.1 retrieving revision 1.71.2.2 diff -u -r1.71.2.1 -r1.71.2.2 --- src/usr.bin/ssh/ssh-add.c 2005/09/04 18:40:08 1.71.2.1 +++ src/usr.bin/ssh/ssh-add.c 2006/02/03 02:53:45 1.71.2.2 @@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.71.2.1 2005/09/04 18:40:08 brad Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.71.2.2 2006/02/03 02:53:45 brad Exp $"); #include @@ -312,12 +312,16 @@ 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. */ ac = ssh_get_authentication_connection(); if (ac == NULL) { - fprintf(stderr, "Could not open a connection to your authentication agent.\n"); + fprintf(stderr, + "Could not open a connection to your authentication agent.\n"); exit(2); } while ((ch = getopt(argc, argv, "lLcdDxXe:s:t:")) != -1) {