]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: don't misdetect comma-separated hostkey names as wildcards;
authordjm@openbsd.org <djm@openbsd.org>
Thu, 8 Oct 2020 01:15:16 +0000 (01:15 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 9 Oct 2020 07:39:17 +0000 (18:39 +1100)
spotted by naddy@

OpenBSD-Commit-ID: 4b874edfec7fc324a21b130bdb42f912177739ce

clientloop.c

index 975a85ef985015f4723788f74d84204a6ebfe169..f3014b8d577fe9d6d9bfd4a51f4a52c220fa6169 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.348 2020/10/07 02:22:23 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.349 2020/10/08 01:15:16 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1872,9 +1872,9 @@ hostkeys_find(struct hostkey_foreach_line *l, void *_ctx)
 
        /* UpdateHostkeys is skipped for wildcard host names */
        if (strchr(l->hosts, '*') != NULL ||
-           strchr(l->hosts, ',') != NULL) {
-               debug3("%s: hostkeys file %s:%ld contains wildcard or pattern",
-                    __func__, l->path, l->linenum);
+           strchr(l->hosts, '?') != NULL) {
+               debug3("%s: hostkeys file %s:%ld contains wildcard", __func__,
+                   l->path, l->linenum);
                ctx->wildcard_hostspec = 1;
        }