mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
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:
@@ -355,10 +355,8 @@ static int client(ssh_session session)
|
||||
}
|
||||
/* Parse configuration file if specified: The command-line options will
|
||||
* overwrite items loaded from configuration file */
|
||||
if (config_file != NULL) {
|
||||
ssh_options_parse_config(session, config_file);
|
||||
} else {
|
||||
ssh_options_parse_config(session, NULL);
|
||||
if (ssh_options_parse_config(session, config_file) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ssh_connect(session)) {
|
||||
|
||||
Reference in New Issue
Block a user