test for first-match-wins in authorized_keys environment=
authordjm <djm@openbsd.org>
Sat, 24 Jul 2021 01:54:23 +0000 (01:54 +0000)
committerdjm <djm@openbsd.org>
Sat, 24 Jul 2021 01:54:23 +0000 (01:54 +0000)
options

regress/usr.bin/ssh/unittests/authopt/tests.c

index 0e8aacb..4fedf0a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: tests.c,v 1.1 2018/03/03 03:16:17 djm Exp $ */
+/*     $OpenBSD: tests.c,v 1.2 2021/07/24 01:54:23 djm Exp $ */
 
 /*
  * Regress test for keys options functions.
@@ -268,6 +268,8 @@ test_authkeys_parse(void)
        } while (0)
        ARRAY_TEST("environment", "environment=\"foo=1\",environment=\"bar=2\"",
            env, nenv, "foo=1,bar=2");
+       ARRAY_TEST("environment", "environment=\"foo=1\",environment=\"foo=2\"",
+           env, nenv, "foo=1");
        ARRAY_TEST("permitopen", "permitopen=\"foo:123\",permitopen=\"bar:*\"",
            permitopen, npermitopen, "foo:123,bar:*");
 #undef ARRAY_TEST