mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +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:
committed by
Andreas Schneider
parent
e4f80bd142
commit
5333be5988
@@ -219,7 +219,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
|
|||||||
|
|
||||||
opcode = ssh_config_get_opcode(keyword);
|
opcode = ssh_config_get_opcode(keyword);
|
||||||
if (*parsing == 1 && opcode != SOC_HOST) {
|
if (*parsing == 1 && opcode != SOC_HOST) {
|
||||||
if (seen[opcode] == 0) {
|
if (seen[opcode] != 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
seen[opcode] = 1;
|
seen[opcode] = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user