diff options
author | djm@openbsd.org <djm@openbsd.org> | 2021-01-27 11:05:28 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2021-01-27 11:10:57 +0100 |
commit | 39be3dc209f28f9c1ebfeba42adde8963b01e1cd (patch) | |
tree | d40c854a19626434deaf3b6e1706517ae234827f /auth2-hostbased.c | |
parent | upstream: remove global variable used to stash compat flags and use the (diff) | |
download | openssh-39be3dc209f28f9c1ebfeba42adde8963b01e1cd.tar.xz openssh-39be3dc209f28f9c1ebfeba42adde8963b01e1cd.zip |
upstream: make ssh->kex->session_id a sshbuf instead of u_char*/size_t
and use that instead of global variables containing copies of it. feedback/ok
markus@
OpenBSD-Commit-ID: a4b1b1ca4afd2e37cb9f64f737b30a6a7f96af68
Diffstat (limited to 'auth2-hostbased.c')
-rw-r--r-- | auth2-hostbased.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/auth2-hostbased.c b/auth2-hostbased.c index 3bc799c42..002e7e4ee 100644 --- a/auth2-hostbased.c +++ b/auth2-hostbased.c @@ -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. * @@ -35,6 +35,7 @@ #include "xmalloc.h" #include "ssh2.h" #include "packet.h" +#include "kex.h" #include "sshbuf.h" #include "log.h" #include "misc.h" @@ -54,8 +55,6 @@ /* import */ extern ServerOptions options; -extern u_char *session_id2; -extern u_int session_id2_len; static int userauth_hostbased(struct ssh *ssh) @@ -129,7 +128,7 @@ userauth_hostbased(struct ssh *ssh) 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 || |