=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-agent.c,v retrieving revision 1.122 retrieving revision 1.122.2.1 diff -u -r1.122 -r1.122.2.1 --- src/usr.bin/ssh/ssh-agent.c 2004/10/29 22:53:56 1.122 +++ src/usr.bin/ssh/ssh-agent.c 2006/02/03 02:53:45 1.122.2.1 @@ -35,7 +35,7 @@ #include "includes.h" #include -RCSID("$OpenBSD: ssh-agent.c,v 1.122 2004/10/29 22:53:56 djm Exp $"); +RCSID("$OpenBSD: ssh-agent.c,v 1.122.2.1 2006/02/03 02:53:45 brad Exp $"); #include #include @@ -351,7 +351,7 @@ if (id != NULL) { /* * We have this key. Free the old key. Since we - * don\'t want to leave empty slots in the middle of + * don't want to leave empty slots in the middle of * the array, we actually free the key there and move * all the entries between the empty slot and the end * of the array. @@ -1000,6 +1000,9 @@ extern char *optarg; pid_t pid; char pidstrbuf[1 + 3 * sizeof pid]; + + /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ + sanitise_stdfd(); /* drop */ setegid(getgid());