diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-09-13 23:40:08 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-09-13 23:40:08 +0000 |
commit | f7ed8afaa32cf14a3921e1a6629a45030d317578 (patch) | |
tree | aff976549515501dd8aecdd5af5558144fc815d4 /usr.bin/ssh/sftp.c | |
parent | 1c0cfe866c6d27bcf2266c00206273572ea38d15 (diff) |
ensure that stdio fds are attached; ok deraadt@
Diffstat (limited to 'usr.bin/ssh/sftp.c')
-rw-r--r-- | usr.bin/ssh/sftp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index d0070a1d1af..f7c044b01be 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -16,7 +16,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.66 2005/08/08 13:22:48 jaredy Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.67 2005/09/13 23:40:07 djm Exp $"); #include <glob.h> #include <histedit.h> @@ -1428,6 +1428,9 @@ main(int argc, char **argv) extern int optind; extern char *optarg; + /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ + sanitise_stdfd(); + args.list = NULL; addargs(&args, "ssh"); /* overwritten with ssh_program */ addargs(&args, "-oForwardX11 no"); |