diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2009-10-06 04:46:41 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2009-10-06 04:46:41 +0000 |
commit | d1da4f1a6b10435bdf919e5cc60cab12d9b8afa5 (patch) | |
tree | 87376aa1dba4fa756e89d04905df8553989d561f | |
parent | b8a8b02f7113c813127201652c5120cf8c7c21e3 (diff) |
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-- | usr.bin/ssh/session.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 879b0300ea3..52f26632de0 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.246 2009/04/17 19:23:06 stevesk Exp $ */ +/* $OpenBSD: session.c,v 1.247 2009/10/06 04:46:40 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -1403,6 +1403,8 @@ do_child(Session *s, const char *command) exit(sftp_server_main(i, argv, s->pw)); } + fflush(NULL); + if (options.use_login) { launch_login(pw, hostname); /* NEVERREACHED */ |