|
Line 0
Link Here
|
|
|
1 |
From 5333be5988c3789e7011598995f4df90d50d84d0 Mon Sep 17 00:00:00 2001 |
| 2 |
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com> |
| 3 |
Date: Sun, 4 Jun 2017 11:54:55 +0300 |
| 4 |
Subject: config: Bugfix: Don't skip unseen opcodes |
| 5 |
|
| 6 |
libssh fails to read the configuration from a config file due to a |
| 7 |
wrong check in 'ssh_config_parse_line' procedure in 'config.c'; it's |
| 8 |
effectively skipping every opcode (and therefore every option) from |
| 9 |
the file. The change fixes that behaviour. |
| 10 |
|
| 11 |
Signed-off-by: Artyom V. Poptsov <poptsov.artyom@gmail.com> |
| 12 |
Reviewed-by: Andreas Schneider <asn@cryptomilk.org> |
| 13 |
--- |
| 14 |
src/config.c | 2 +- |
| 15 |
1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 |
|
| 17 |
diff --git a/src/config.c b/src/config.c |
| 18 |
index 6478fc5f..519926e7 100644 |
| 19 |
--- a/src/config.c |
| 20 |
+++ b/src/config.c |
| 21 |
@@ -219,7 +219,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line, |
| 22 |
|
| 23 |
opcode = ssh_config_get_opcode(keyword); |
| 24 |
if (*parsing == 1 && opcode != SOC_HOST) { |
| 25 |
- if (seen[opcode] == 0) { |
| 26 |
+ if (seen[opcode] != 0) { |
| 27 |
return 0; |
| 28 |
} |
| 29 |
seen[opcode] = 1; |
| 30 |
-- |
| 31 |
cgit v1.1 |
| 32 |
|