summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshconnect2.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-02-28 09:57:08 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-02-28 09:57:08 +0000
commitd73717f0b9bc49ae76553d5e0c90941c508026cb (patch)
tree3b4cb292438981d6db63c170f1e2bbddea8400e0 /usr.bin/ssh/sshconnect2.c
parent85262c35779ae15e4787a00ee9b4cb8801870d4a (diff)
in ssh protocol v2 use ignore messages for padding (instead of trailing \0).
Diffstat (limited to 'usr.bin/ssh/sshconnect2.c')
-rw-r--r--usr.bin/ssh/sshconnect2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 12335e80eef..8b523232f0c 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.48 2001/02/15 23:19:59 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.49 2001/02/28 09:57:07 markus Exp $");
#include <openssl/bn.h>
#include <openssl/md5.h>
@@ -658,9 +658,10 @@ userauth_passwd(Authctxt *authctxt)
packet_put_cstring(authctxt->service);
packet_put_cstring(authctxt->method->name);
packet_put_char(0);
- ssh_put_password(password);
+ packet_put_cstring(password);
memset(password, 0, strlen(password));
xfree(password);
+ packet_inject_ignore(64);
packet_send();
packet_write_wait();
return 1;
@@ -928,13 +929,14 @@ input_userauth_info_req(int type, int plen, void *ctxt)
response = cli_prompt(prompt, echo);
- ssh_put_password(response);
+ packet_put_cstring(response);
memset(response, 0, strlen(response));
xfree(response);
xfree(prompt);
}
packet_done(); /* done with parsing incoming message. */
+ packet_inject_ignore(64);
packet_send();
packet_write_wait();
}