]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: fix "Match invalid-user" from incorrectly being activated
authordjm@openbsd.org <djm@openbsd.org>
Mon, 10 Feb 2025 23:00:29 +0000 (23:00 +0000)
committerDamien Miller <djm@mindrot.org>
Mon, 10 Feb 2025 23:26:21 +0000 (10:26 +1100)
in initial configuration pass when no other predicates were present on the
match line

OpenBSD-Commit-ID: 02703b4bd207fafd03788bc4e7774bf80be6c9a8

servconf.c

index 112b657999612c8a34085915a0ddb4a8abca41f6..a490550021c47b17c38c97f725f2843e3bd50456 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.421 2025/01/15 22:23:13 dtucker Exp $ */
+/* $OpenBSD: servconf.c,v 1.422 2025/02/10 23:00:29 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1077,8 +1077,10 @@ match_cfg_line(const char *full_line, int *acp, char ***avp,
                }
                /* Criterion "invalid-user" also has no argument */
                if (strcasecmp(attrib, "invalid-user") == 0) {
-                       if (ci == NULL)
+                       if (ci == NULL) {
+                               result = 0;
                                continue;
+                       }
                        if (ci->user_invalid == 0)
                                result = 0;
                        else