1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

config: Be less strict when parsing unknown Match keywords

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2025-03-04 13:48:50 +01:00
parent 8ef249a4a4
commit f7bdd779d6
3 changed files with 12 additions and 10 deletions

View File

@ -959,7 +959,9 @@ static void torture_config_match(void **state,
string = config;
}
torture_reset_config(session);
_parse_config(session, file, string, SSH_ERROR);
ssh_options_set(session, SSH_OPTIONS_HOST, "unmatched");
_parse_config(session, file, string, SSH_OK);
assert_string_equal(session->opts.host, "unmatched");
/* Missing argument to unsupported option originalhost */
config = "Match originalhost\n"

View File

@ -1070,7 +1070,7 @@ static void torture_options_config_match(void **state)
fclose(config);
rv = ssh_options_parse_config(session, "test_config");
assert_ssh_return_code_equal(session, rv, SSH_ERROR);
assert_ssh_return_code_equal(session, rv, SSH_OK);
/* The Match all keyword needs to be the only one (start) */
torture_reset_config(session);