diff options
author | Artyom V. Poptsov <poptsov.artyom@gmail.com> | 2017-06-04 11:54:55 +0300 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-06-29 17:08:54 +0200 |
commit | 83663895f4e244aa7d56104689bcee0f56090aa8 (patch) | |
tree | 412e39c1563b574997eb6cfca9e81472a76e03b4 | |
parent | 239d0f75b5f909174c2ef7fb08d23bcfa6b20ba0 (diff) | |
download | libssh-83663895f4e244aa7d56104689bcee0f56090aa8.tar.gz libssh-83663895f4e244aa7d56104689bcee0f56090aa8.tar.xz libssh-83663895f4e244aa7d56104689bcee0f56090aa8.zip |
config: Bugfix: Don't skip unseen opcodes
libssh fails to read the configuration from a config file due to a
wrong check in 'ssh_config_parse_line' procedure in 'config.c'; it's
effectively skipping every opcode (and therefore every option) from
the file. The change fixes that behaviour.
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 5333be5988c3789e7011598995f4df90d50d84d0)
-rw-r--r-- | src/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c index 7c03b27c..c5313ec8 100644 --- a/src/config.c +++ b/src/config.c @@ -219,7 +219,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line, opcode = ssh_config_get_opcode(keyword); if (*parsing == 1 && opcode != SOC_HOST) { - if (seen[opcode] == 0) { + if (seen[opcode] != 0) { return 0; } seen[opcode] = 1; |