summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-03-26 13:04:51 +1000
committerDamien Miller <djm@mindrot.org>2000-03-26 13:04:51 +1000
commit450a7a1ff40fe7c2d84c93b83cf2df53445d807d (patch)
treedb6d08bdea65edd34ba2e323a31e2b1ca5e5fbd4 /ssh.c
parent2c9279fa667827384fceb243f890cba1dbe480de (diff)
- OpenBSD CVS update
- [auth-krb4.c] -Wall - [auth-rh-rsa.c auth-rsa.c hostfile.c hostfile.h key.c key.h match.c] [match.h ssh.c ssh.h sshconnect.c sshd.c] initial support for DSA keys. ok deraadt@, niels@ - [cipher.c cipher.h] remove unused cipher_attack_detected code - [scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8] Fix some formatting problems I missed before. - [ssh.1 sshd.8] fix spelling errors, From: FreeBSD - [ssh.c] switch to raw mode only if he _get_ a pty (not if we _want_ a pty).
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ssh.c b/ssh.c
index bada8e189..faba54ec1 100644
--- a/ssh.c
+++ b/ssh.c
@@ -11,7 +11,7 @@
11 */ 11 */
12 12
13#include "includes.h" 13#include "includes.h"
14RCSID("$Id: ssh.c,v 1.21 2000/03/09 10:27:52 damien Exp $"); 14RCSID("$Id: ssh.c,v 1.22 2000/03/26 03:04:54 damien Exp $");
15 15
16#include "xmalloc.h" 16#include "xmalloc.h"
17#include "ssh.h" 17#include "ssh.h"
@@ -181,6 +181,7 @@ main(int ac, char **av)
181 struct stat st; 181 struct stat st;
182 struct passwd *pw, pwcopy; 182 struct passwd *pw, pwcopy;
183 int interactive = 0, dummy; 183 int interactive = 0, dummy;
184 int have_pty = 0;
184 uid_t original_effective_uid; 185 uid_t original_effective_uid;
185 int plen; 186 int plen;
186 187
@@ -618,9 +619,6 @@ main(int ac, char **av)
618 if (host_private_key_loaded) 619 if (host_private_key_loaded)
619 RSA_free(host_private_key); /* Destroys contents safely */ 620 RSA_free(host_private_key); /* Destroys contents safely */
620 621
621 /* Close connection cleanly after attack. */
622 cipher_attack_detected = packet_disconnect;
623
624 /* Enable compression if requested. */ 622 /* Enable compression if requested. */
625 if (options.compression) { 623 if (options.compression) {
626 debug("Requesting compression at level %d.", options.compression_level); 624 debug("Requesting compression at level %d.", options.compression_level);
@@ -672,9 +670,10 @@ main(int ac, char **av)
672 670
673 /* Read response from the server. */ 671 /* Read response from the server. */
674 type = packet_read(&plen); 672 type = packet_read(&plen);
675 if (type == SSH_SMSG_SUCCESS) 673 if (type == SSH_SMSG_SUCCESS) {
676 interactive = 1; 674 interactive = 1;
677 else if (type == SSH_SMSG_FAILURE) 675 have_pty = 1;
676 } else if (type == SSH_SMSG_FAILURE)
678 log("Warning: Remote host failed or refused to allocate a pseudo tty."); 677 log("Warning: Remote host failed or refused to allocate a pseudo tty.");
679 else 678 else
680 packet_disconnect("Protocol error waiting for pty request response."); 679 packet_disconnect("Protocol error waiting for pty request response.");
@@ -802,7 +801,7 @@ main(int ac, char **av)
802 } 801 }
803 802
804 /* Enter the interactive session. */ 803 /* Enter the interactive session. */
805 exit_status = client_loop(tty_flag, tty_flag ? options.escape_char : -1); 804 exit_status = client_loop(have_pty, tty_flag ? options.escape_char : -1);
806 805
807 /* Close the connection to the remote host. */ 806 /* Close the connection to the remote host. */
808 packet_close(); 807 packet_close();