summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2023-03-03 04:34:50 +0000
committerDamien Miller <djm@cvs.openbsd.org>2023-03-03 04:34:50 +0000
commit14e0c1545d904c81e20d1f8c4ed72e2f6ea5cc08 (patch)
treea46fc7531fe1778c7121a8d5d38bd30da1f0479a /usr.bin
parent75ee232a97b8f5a79130a78d6b72f205d7074159 (diff)
actually print "channeltimeout none" in config dump mode;
spotted via Coverity CID 405022
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/servconf.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c
index 50cd9108dc4..2e9fdc78a77 100644
--- a/usr.bin/ssh/servconf.c
+++ b/usr.bin/ssh/servconf.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: servconf.c,v 1.390 2023/01/17 09:44:48 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.391 2023/03/03 04:34:49 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -2856,8 +2856,16 @@ dump_cfg_strarray_oneline(ServerOpCodes code, u_int count, char **vals)
{
u_int i;
- if (count <= 0 && code != sAuthenticationMethods)
- return;
+ switch (code) {
+ case sAuthenticationMethods:
+ case sChannelTimeout:
+ break;
+ default:
+ if (count <= 0)
+ return;
+ break;
+ }
+
printf("%s", lookup_opcode_name(code));
for (i = 0; i < count; i++)
printf(" %s", vals[i]);