diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-02-13 22:38:18 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-02-13 22:38:18 +0000 |
commit | f2b5c15547e9074adf9b3206e8ed089a067358f7 (patch) | |
tree | 0267e6abec7e10a60f9389f7ec37c919995a0c0e /usr.bin/ssh/session.c | |
parent | 5e6b3a2865f7110320908660f1c039c682d47d2a (diff) |
rekey arc4random and OpenSSL RNG in postauth child
closefrom fds > 2 before shell/command execution
ok markus@
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r-- | usr.bin/ssh/session.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 4064e9d0163..b08f2add25b 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.227 2008/02/10 10:54:29 djm Exp $ */ +/* $OpenBSD: session.c,v 1.228 2008/02/13 22:38:17 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -86,9 +86,6 @@ #include <kafs.h> #endif -/* Magic name for internal sftp-server */ -#define INTERNAL_SFTP_NAME "internal-sftp" - /* func */ Session *session_new(void); @@ -438,6 +435,8 @@ do_exec_no_pty(Session *s, const char *command) if (dup2(err[0], 2) < 0) /* stderr */ perror("dup2 stderr"); + closefrom(STDERR_FILENO + 1); + /* Do processing for the child (exec command etc). */ do_child(s, command); /* NOTREACHED */ @@ -508,6 +507,8 @@ do_exec_pty(Session *s, const char *command) if (!(options.use_login && command == NULL)) do_login(s, command); + closefrom(STDERR_FILENO + 1); + /* Do common processing for the child, such as execing the command. */ do_child(s, command); /* NOTREACHED */ |