aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/ssh.c')
-rw-r--r--crypto/openssh/ssh.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c
index cfaab2573c19..149f94582916 100644
--- a/crypto/openssh/ssh.c
+++ b/crypto/openssh/ssh.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$Id: ssh.c,v 1.41 2000/02/28 19:51:58 markus Exp $");
+RCSID("$Id: ssh.c,v 1.43 2000/03/23 21:52:02 markus Exp $");
#include "xmalloc.h"
#include "ssh.h"
@@ -176,6 +176,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;
@@ -616,9 +617,6 @@ main(int ac, char **av)
if (host_private_key_loaded)
RSA_free(host_private_key); /* Destroys contents safely */
- /* Close connection cleanly after attack. */
- cipher_attack_detected = packet_disconnect;
-
/* Enable compression if requested. */
if (options.compression) {
debug("Requesting compression at level %d.", options.compression_level);
@@ -670,9 +668,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.");
@@ -800,7 +799,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();