From 3dff176ed9509b5bd92947b9504545495a2052cc Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 10 Feb 2008 22:25:52 +1100 Subject: - djm@cvs.openbsd.org 2008/01/19 23:09:49 [readconf.c readconf.h sshconnect2.c] promote rekeylimit to a int64 so it can hold the maximum useful limit of 2^32; report and patch from Jan.Pechanec AT Sun.COM, ok dtucker@ --- sshconnect2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sshconnect2.c') diff --git a/sshconnect2.c b/sshconnect2.c index 208df078c..5bb772368 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.164 2007/05/17 23:53:41 jolan Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.165 2008/01/19 23:09:49 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -130,7 +130,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr) options.hostkeyalgorithms; if (options.rekey_limit) - packet_set_rekey_limit(options.rekey_limit); + packet_set_rekey_limit((u_int32_t)options.rekey_limit); /* start key exchange */ kex = kex_setup(myproposal); -- cgit v1.2.3 From 7ba0ca7f6fa0c517822051412cf9f0e7b35304d4 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 17 Jul 2008 18:57:06 +1000 Subject: - djm@cvs.openbsd.org 2008/07/17 08:48:00 [sshconnect2.c] strnvis preauth banner; pointed out by mpf@ ok markus@ --- ChangeLog | 8 +++++++- sshconnect2.c | 18 +++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index 13addb89d..115e8b449 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +20080717 + - (djm) OpenBSD CVS Sync + - djm@cvs.openbsd.org 2008/07/17 08:48:00 + [sshconnect2.c] + strnvis preauth banner; pointed out by mpf@ ok markus@ + 20080716 - OpenBSD CVS Sync - djm@cvs.openbsd.org 2008/07/15 02:23:14 @@ -4684,4 +4690,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.5087 2008/07/16 12:42:06 djm Exp $ +$Id: ChangeLog,v 1.5088 2008/07/17 08:57:06 djm Exp $ diff --git a/sshconnect2.c b/sshconnect2.c index 5bb772368..067fad545 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.165 2008/01/19 23:09:49 djm Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.166 2008/07/17 08:48:00 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * @@ -38,6 +38,7 @@ #include #include #include +#include #include "openbsd-compat/sys-queue.h" @@ -374,14 +375,21 @@ input_userauth_error(int type, u_int32_t seq, void *ctxt) void input_userauth_banner(int type, u_int32_t seq, void *ctxt) { - char *msg, *lang; + char *msg, *raw, *lang; + u_int len; debug3("input_userauth_banner"); - msg = packet_get_string(NULL); + raw = packet_get_string(&len); lang = packet_get_string(NULL); - if (options.log_level >= SYSLOG_LEVEL_INFO) + if (options.log_level >= SYSLOG_LEVEL_INFO) { + if (len > 65536) + len = 65536; + msg = xmalloc(len * 4); /* max expansion from strnvis() */ + strnvis(msg, raw, len * 4, VIS_SAFE|VIS_OCTAL); fprintf(stderr, "%s", msg); - xfree(msg); + xfree(msg); + } + xfree(raw); xfree(lang); } -- cgit v1.2.3 From 2e28d8622d7b2227669a12630ea2c340e651c204 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 17 Jul 2008 19:15:43 +1000 Subject: - (djm) [sshconnect2.c] vis.h isn't available everywhere --- ChangeLog | 5 +++-- sshconnect2.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'sshconnect2.c') diff --git a/ChangeLog b/ChangeLog index a0c319fe8..19f075f4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,7 +9,8 @@ report and patch from res AT qoxp.net (bz#1200); ok markus@ - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Remove long-unneeded compat code, replace with equivalent cygwin library call. Patch from vinschen - at redhat.comi, ok djm@. + at redhat.com, ok djm@. + - (djm) [sshconnect2.c] vis.h isn't available everywhere 20080716 - OpenBSD CVS Sync @@ -4697,4 +4698,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.5090 2008/07/17 09:03:49 dtucker Exp $ +$Id: ChangeLog,v 1.5091 2008/07/17 09:15:43 djm Exp $ diff --git a/sshconnect2.c b/sshconnect2.c index 067fad545..389bec9e4 100644 --- a/sshconnect2.c +++ b/sshconnect2.c @@ -38,7 +38,9 @@ #include #include #include +#if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) #include +#endif #include "openbsd-compat/sys-queue.h" -- cgit v1.2.3