aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2017-06-04 11:54:55 +0300
committerAndreas Schneider <asn@cryptomilk.org>2017-06-06 10:19:37 +0200
commit5333be5988c3789e7011598995f4df90d50d84d0 (patch)
tree5f4b74258efd3772b4f007da22bdb7db470fac12 /src/config.c
parente4f80bd1423942adda559ddbe031b4c029ee6d7a (diff)
downloadlibssh-5333be5988c3789e7011598995f4df90d50d84d0.tar.gz
libssh-5333be5988c3789e7011598995f4df90d50d84d0.tar.xz
libssh-5333be5988c3789e7011598995f4df90d50d84d0.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>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 6478fc5f..519926e7 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;