diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-05-19 20:53:53 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-05-19 20:53:53 +0000 |
commit | e65af878b30bf9f881078ac307b180e505854ea0 (patch) | |
tree | 2c7910853fecbcbf1ebf2a1be008b44c29063211 | |
parent | c46cc73c13710d87515d0271fb25e13cd4cce943 (diff) |
unbreak tree by committing this bit that I missed from:
Fix sending tty modes when stdin is not a tty (bz#1199). Previously
we would send the modes corresponding to a zeroed struct termios,
whereas we should have been sending an empty list of modes.
Based on patch from daniel.ritz AT alcatel.ch; ok dtucker@ markus@
-rw-r--r-- | usr.bin/ssh/clientloop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 2a0f186d61a..3cc7a0ed690 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.193 2008/05/09 16:21:13 markus Exp $ */ +/* $OpenBSD: clientloop.c,v 1.194 2008/05/19 20:53:52 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1711,7 +1711,6 @@ client_session2_setup(int id, int want_tty, int want_subsystem, if (want_tty) { struct winsize ws; - struct termios tio; /* Store window size in the packet. */ if (ioctl(in_fd, TIOCGWINSZ, &ws) < 0) @@ -1724,8 +1723,9 @@ client_session2_setup(int id, int want_tty, int want_subsystem, packet_put_int((u_int)ws.ws_row); packet_put_int((u_int)ws.ws_xpixel); packet_put_int((u_int)ws.ws_ypixel); - tio = get_saved_tio(); - tty_make_modes(-1, tiop != NULL ? tiop : &tio); + if (tiop == NULL) + tiop = get_saved_tio(); + tty_make_modes(-1, tiop); packet_send(); /* XXX wait for reply */ c->client_tty = 1; |