diff options
author | 2001-02-28 09:57:06 +0000 | |
---|---|---|
committer | 2001-02-28 09:57:06 +0000 | |
commit | 1cbc0ebf286d4cf5ec2e7c5c88aeb9f948827636 (patch) | |
tree | f301487d4b97ca82cda8f10548a32a0c7c4c3eb7 /usr.bin/ssh/sshconnect2.c | |
parent | make sure remote stderr does not get truncated. (diff) | |
download | wireguard-openbsd-1cbc0ebf286d4cf5ec2e7c5c88aeb9f948827636.tar.xz wireguard-openbsd-1cbc0ebf286d4cf5ec2e7c5c88aeb9f948827636.zip |
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.c | 8 |
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(); } |