diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-03-23 21:52:03 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-03-23 21:52:03 +0000 |
commit | fd0272679a548e0c5a822224eeca67f92561b3b2 (patch) | |
tree | b86ecface67420ca680a36ba32edbb604b01b1b0 /usr.bin/ssh | |
parent | 4684cfef89d32a9bab1b6108bb67be2ef91ab20a (diff) |
switch to raw mode only if he _get_ a pty (not if we _want_ a pty).
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/ssh.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index b847e73ff90..c5652eaa67e 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -11,7 +11,7 @@ */ #include "includes.h" -RCSID("$Id: ssh.c,v 1.42 2000/03/22 09:55:10 markus Exp $"); +RCSID("$Id: ssh.c,v 1.43 2000/03/23 21:52:02 markus Exp $"); #include "xmalloc.h" #include "ssh.h" @@ -171,6 +171,7 @@ main(int ac, char **av) struct stat st; struct passwd *pw, pwcopy; int interactive = 0, dummy; + int have_pty = 0; uid_t original_effective_uid; int plen; @@ -661,9 +662,10 @@ main(int ac, char **av) /* Read response from the server. */ type = packet_read(&plen); - if (type == SSH_SMSG_SUCCESS) + if (type == SSH_SMSG_SUCCESS) { interactive = 1; - else if (type == SSH_SMSG_FAILURE) + have_pty = 1; + } else if (type == SSH_SMSG_FAILURE) log("Warning: Remote host failed or refused to allocate a pseudo tty."); else packet_disconnect("Protocol error waiting for pty request response."); @@ -791,7 +793,7 @@ main(int ac, char **av) } /* Enter the interactive session. */ - exit_status = client_loop(tty_flag, tty_flag ? options.escape_char : -1); + exit_status = client_loop(have_pty, tty_flag ? options.escape_char : -1); /* Close the connection to the remote host. */ packet_close(); |