]> 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:37:17 +0000 (10:37 +1100)
in initial configuration pass when no other predicates were present on the
match line

OpenBSD-Commit-ID: 02703b4bd207fafd03788bc4e7774bf80be6c9a8

servconf.c

index dd774f46817c911a4bf6fe0b6cfb358f2167e9f6..bef1b511ed5d2e22519fef2dbb10c4a8cbf27ac8 100644 (file)
@@ -1073,8 +1073,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