diff options
author | dtucker <dtucker> | 2008-06-08 02:53:20 +0000 |
---|---|---|
committer | dtucker <dtucker> | 2008-06-08 02:53:20 +0000 |
commit | 35b71d561c0655721bb6504c875f244c53a569a7 (patch) | |
tree | 36737778a99632e4eb04a44d25f31b8438605cc9 /sshtty.c | |
parent | b0a2e7ec4fe4aafec99ee725145e810f5baad708 (diff) | |
download | openssh-35b71d561c0655721bb6504c875f244c53a569a7.tar.gz |
- 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 @@ -/* $OpenBSD: sshtty.c,v 1.12 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: sshtty.c,v 1.13 2008/05/19 15:45:07 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -47,10 +47,10 @@ static struct termios _saved_tio; static int _in_raw_mode = 0; -struct termios +struct termios * get_saved_tio(void) { - return _saved_tio; + return _in_raw_mode ? &_saved_tio : NULL; } void |