1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

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>
This commit is contained in:
Artyom V. Poptsov
2017-06-04 11:54:55 +03:00
committed by Andreas Schneider
parent e4f80bd142
commit 5333be5988

View File

@@ -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;