]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: actually print "channeltimeout none" in config dump mode;
authordjm@openbsd.org <djm@openbsd.org>
Fri, 3 Mar 2023 04:34:49 +0000 (04:34 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 3 Mar 2023 05:12:04 +0000 (16:12 +1100)
spotted via Coverity CID 405022

OpenBSD-Commit-ID: b074b52bf138b75f08264e8da15880b29c7a630f

servconf.c

index 2e039da8b95e85719bf482c9c437a148b7cbe23f..552fda75068a35d202d77f8fb46d29dbd913aa42 100644 (file)
@@ -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
@@ -2917,8 +2917,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]);