=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.229 retrieving revision 1.230 diff -u -r1.229 -r1.230 --- src/usr.bin/ssh/session.c 2008/02/20 15:25:26 1.229 +++ src/usr.bin/ssh/session.c 2008/02/22 05:58:56 1.230 @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.229 2008/02/20 15:25:26 markus Exp $ */ +/* $OpenBSD: session.c,v 1.230 2008/02/22 05:58:56 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -435,8 +435,6 @@ 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 */ @@ -507,8 +505,6 @@ 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 */ @@ -1218,6 +1214,8 @@ if (login_getcapbool(lc, "requirehome", 0)) exit(1); } + + closefrom(STDERR_FILENO + 1); if (!options.use_login) do_rc_files(s, shell);