diff options
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index ac3ad013b..14e3d401a 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: sshconnect2.c,v 1.71 2001/04/18 22:03:45 markus Exp $"); | 26 | RCSID("$OpenBSD: sshconnect2.c,v 1.72 2001/04/18 23:43:26 markus Exp $"); |
27 | 27 | ||
28 | #include <openssl/bn.h> | 28 | #include <openssl/bn.h> |
29 | #include <openssl/md5.h> | 29 | #include <openssl/md5.h> |
@@ -815,6 +815,7 @@ userauth_hostbased(Authctxt *authctxt) | |||
815 | Buffer b; | 815 | Buffer b; |
816 | u_char *signature, *blob; | 816 | u_char *signature, *blob; |
817 | char *chost, *pkalg, *p; | 817 | char *chost, *pkalg, *p; |
818 | const char *service; | ||
818 | u_int blen, slen; | 819 | u_int blen, slen; |
819 | int ok, i, len, found = 0; | 820 | int ok, i, len, found = 0; |
820 | 821 | ||
@@ -847,20 +848,15 @@ userauth_hostbased(Authctxt *authctxt) | |||
847 | xfree(chost); | 848 | xfree(chost); |
848 | return 0; | 849 | return 0; |
849 | } | 850 | } |
851 | service = datafellows & SSH_BUG_HBSERVICE ? "ssh-userauth" : | ||
852 | authctxt->service; | ||
850 | pkalg = xstrdup(key_ssh_name(private)); | 853 | pkalg = xstrdup(key_ssh_name(private)); |
851 | buffer_init(&b); | 854 | buffer_init(&b); |
852 | if (datafellows & SSH_OLD_SESSIONID) { | ||
853 | buffer_append(&b, session_id2, session_id2_len); | ||
854 | } else { | ||
855 | buffer_put_string(&b, session_id2, session_id2_len); | ||
856 | } | ||
857 | /* construct data */ | 855 | /* construct data */ |
856 | buffer_put_string(&b, session_id2, session_id2_len); | ||
858 | buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); | 857 | buffer_put_char(&b, SSH2_MSG_USERAUTH_REQUEST); |
859 | buffer_put_cstring(&b, authctxt->server_user); | 858 | buffer_put_cstring(&b, authctxt->server_user); |
860 | buffer_put_cstring(&b, | 859 | buffer_put_cstring(&b, service); |
861 | datafellows & SSH_BUG_HBSERVICE ? | ||
862 | "ssh-userauth" : | ||
863 | authctxt->service); | ||
864 | buffer_put_cstring(&b, authctxt->method->name); | 860 | buffer_put_cstring(&b, authctxt->method->name); |
865 | buffer_put_cstring(&b, pkalg); | 861 | buffer_put_cstring(&b, pkalg); |
866 | buffer_put_string(&b, blob, blen); | 862 | buffer_put_string(&b, blob, blen); |