summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-10-07 09:02:18 +1100
committerDarren Tucker <dtucker@zip.com.au>2009-10-07 09:02:18 +1100
commit695ed397a5216189629aa717d03d72ad21cdee1a (patch)
tree42f22fdfd6038d6de16f264a9976e96e19100c35
parent759cb2a49aefe2757ec7b023024881f5d00efef5 (diff)
- djm@cvs.openbsd.org 2009/10/06 04:46:40
[session.c] bz#1596: fflush(NULL) before exec() to ensure that everying (motd in particular) has made it out before the streams go away.
-rw-r--r--ChangeLog4
-rw-r--r--session.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f2233fb9b..0914bf05b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,6 +84,10 @@
84 [dh.c] 84 [dh.c]
85 fix a cast 85 fix a cast
86 ok djm@ markus@ 86 ok djm@ markus@
87 - djm@cvs.openbsd.org 2009/10/06 04:46:40
88 [session.c]
89 bz#1596: fflush(NULL) before exec() to ensure that everying (motd
90 in particular) has made it out before the streams go away.
87 91
8820091002 9220091002
89 - (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps. 93 - (djm) [Makefile.in] Mention readconf.o in ssh-keysign's make deps.
diff --git a/session.c b/session.c
index f4a363543..d55419fbd 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: session.c,v 1.246 2009/04/17 19:23:06 stevesk Exp $ */ 1/* $OpenBSD: session.c,v 1.247 2009/10/06 04:46:40 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -1799,6 +1799,8 @@ do_child(Session *s, const char *command)
1799 exit(sftp_server_main(i, argv, s->pw)); 1799 exit(sftp_server_main(i, argv, s->pw));
1800 } 1800 }
1801 1801
1802 fflush(NULL);
1803
1802 if (options.use_login) { 1804 if (options.use_login) {
1803 launch_login(pw, hostname); 1805 launch_login(pw, hostname);
1804 /* NEVERREACHED */ 1806 /* NEVERREACHED */