diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-06-08 12:53:20 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-06-08 12:53:20 +1000 |
commit | dd39264e4b4fcd5a9fd4141b1f7b10eff09b3f8c (patch) | |
tree | 0430fcc66e198ba19cf1039fe6bc5b488bb65344 /sshtty.c | |
parent | 136e56f68967fd39e8868769f3af316f1cca0559 (diff) |
- djm@cvs.openbsd.org 2008/05/19 15:45:07
[sshtty.c ttymodes.c sshpty.h]
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@
Diffstat (limited to 'sshtty.c')
-rw-r--r-- | sshtty.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshtty.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ | 1 | /* $OpenBSD: sshtty.c,v 1.13 2008/05/19 15:45:07 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -47,10 +47,10 @@ | |||
47 | static struct termios _saved_tio; | 47 | static struct termios _saved_tio; |
48 | static int _in_raw_mode = 0; | 48 | static int _in_raw_mode = 0; |
49 | 49 | ||
50 | struct termios | 50 | struct termios * |
51 | get_saved_tio(void) | 51 | get_saved_tio(void) |
52 | { | 52 | { |
53 | return _saved_tio; | 53 | return _in_raw_mode ? &_saved_tio : NULL; |
54 | } | 54 | } |
55 | 55 | ||
56 | void | 56 | void |