diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2017-12-18 23:13:43 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2017-12-18 23:13:43 +0000 |
commit | a52576c8a9dbaddccf81ce4f15c791ed3d28ca50 (patch) | |
tree | 0e8bec3be220559caf9d0ba3551fbbe6fb8863c8 | |
parent | f4151fbf8639c0a3da1bfb2bd31a91cb4dd1a2d7 (diff) |
pass kex->hostkey_alg and kex->hostkey_nid from pre-auth to post-auth
unpriviledged child processes; ok markus@
-rw-r--r-- | usr.bin/ssh/packet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index 039359eb546..2c0c01953ff 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.268 2017/12/10 05:55:29 dtucker Exp $ */ +/* $OpenBSD: packet.c,v 1.269 2017/12/18 23:13:42 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -2153,7 +2153,9 @@ kex_to_blob(struct sshbuf *m, struct kex *kex) if ((r = sshbuf_put_string(m, kex->session_id, kex->session_id_len)) != 0 || (r = sshbuf_put_u32(m, kex->we_need)) != 0 || + (r = sshbuf_put_cstring(m, kex->hostkey_alg)) != 0 || (r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 || + (r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 || (r = sshbuf_put_u32(m, kex->kex_type)) != 0 || (r = sshbuf_put_stringb(m, kex->my)) != 0 || (r = sshbuf_put_stringb(m, kex->peer)) != 0 || @@ -2317,7 +2319,9 @@ kex_from_blob(struct sshbuf *m, struct kex **kexp) } if ((r = sshbuf_get_string(m, &kex->session_id, &kex->session_id_len)) != 0 || (r = sshbuf_get_u32(m, &kex->we_need)) != 0 || + (r = sshbuf_get_cstring(m, &kex->hostkey_alg, NULL)) != 0 || (r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_type)) != 0 || + (r = sshbuf_get_u32(m, (u_int *)&kex->hostkey_nid)) != 0 || (r = sshbuf_get_u32(m, &kex->kex_type)) != 0 || (r = sshbuf_get_stringb(m, kex->my)) != 0 || (r = sshbuf_get_stringb(m, kex->peer)) != 0 || |