=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/auth2-hostbased.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- src/usr.bin/ssh/auth2-hostbased.c 2021/01/26 05:32:21 1.45 +++ src/usr.bin/ssh/auth2-hostbased.c 2021/01/27 10:05:28 1.46 @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-hostbased.c,v 1.45 2021/01/26 05:32:21 dtucker Exp $ */ +/* $OpenBSD: auth2-hostbased.c,v 1.46 2021/01/27 10:05:28 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -34,6 +34,7 @@ #include "xmalloc.h" #include "ssh2.h" #include "packet.h" +#include "kex.h" #include "sshbuf.h" #include "log.h" #include "misc.h" @@ -53,8 +54,6 @@ /* import */ extern ServerOptions options; -extern u_char *session_id2; -extern u_int session_id2_len; static int userauth_hostbased(struct ssh *ssh) @@ -128,7 +127,7 @@ if ((b = sshbuf_new()) == NULL) fatal_f("sshbuf_new failed"); /* reconstruct packet */ - if ((r = sshbuf_put_string(b, session_id2, session_id2_len)) != 0 || + if ((r = sshbuf_put_stringb(b, ssh->kex->session_id)) != 0 || (r = sshbuf_put_u8(b, SSH2_MSG_USERAUTH_REQUEST)) != 0 || (r = sshbuf_put_cstring(b, authctxt->user)) != 0 || (r = sshbuf_put_cstring(b, authctxt->service)) != 0 ||