ssh_client: Return non-zero on config parsing failure

Signed-off-by: Samir Benmendil <me@rmz.io>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Samir Benmendil
2025-12-22 11:55:34 +00:00
parent c4f1a70a89
commit 62c85a59a9

View File

@@ -355,10 +355,8 @@ static int client(ssh_session session)
} }
/* Parse configuration file if specified: The command-line options will /* Parse configuration file if specified: The command-line options will
* overwrite items loaded from configuration file */ * overwrite items loaded from configuration file */
if (config_file != NULL) { if (ssh_options_parse_config(session, config_file) < 0) {
ssh_options_parse_config(session, config_file); return -1;
} else {
ssh_options_parse_config(session, NULL);
} }
if (ssh_connect(session)) { if (ssh_connect(session)) {