]> andersk Git - openssh.git/blobdiff - sftp-server.c
- djm@cvs.openbsd.org 2005/09/13 23:40:07
[openssh.git] / sftp-server.c
index 6870e7732039ec94661aea29fd3f703da0a31f9c..e7d000cffe93bd8613ba4f088e931cf0f762eae1 100644 (file)
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 #include "includes.h"
-RCSID("$OpenBSD: sftp-server.c,v 1.48 2005/06/17 02:44:33 djm Exp $");
+RCSID("$OpenBSD: sftp-server.c,v 1.49 2005/09/13 23:40:07 djm Exp $");
 
 #include "buffer.h"
 #include "bufaux.h"
 #include "getput.h"
 #include "log.h"
 #include "xmalloc.h"
+#include "misc.h"
 
 #include "sftp.h"
 #include "sftp-common.h"
@@ -1036,6 +1037,9 @@ main(int ac, char **av)
        int in, out, max;
        ssize_t len, olen, set_size;
 
+       /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
+       sanitise_stdfd();
+
        /* XXX should use getopt */
 
        __progname = ssh_get_progname(av[0]);
This page took 0.042824 seconds and 4 git commands to generate.