diff --git a/0001-config-Bugfix-Dont-skip-unseen-opcodes.patch b/0001-config-Bugfix-Dont-skip-unseen-opcodes.patch new file mode 100644 index 0000000..0e6dc58 --- /dev/null +++ b/0001-config-Bugfix-Dont-skip-unseen-opcodes.patch @@ -0,0 +1,32 @@ +From 5333be5988c3789e7011598995f4df90d50d84d0 Mon Sep 17 00:00:00 2001 +From: "Artyom V. Poptsov" +Date: Sun, 4 Jun 2017 11:54:55 +0300 +Subject: 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 +Reviewed-by: Andreas Schneider +--- + src/config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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; +-- +cgit v1.1 + diff --git a/libssh.changes b/libssh.changes index d5c55cf..52cfd18 100644 --- a/libssh.changes +++ b/libssh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Dec 24 14:41:46 UTC 2017 - fabian@ritter-vogt.de + +- Add patch to fix parsing of config files (boo#1067782): + * 0001-config-Bugfix-Dont-skip-unseen-opcodes.patch + ------------------------------------------------------------------- Fri Sep 15 08:31:32 UTC 2017 - vcizek@suse.com diff --git a/libssh.spec b/libssh.spec index 6d095de..1c6e836 100644 --- a/libssh.spec +++ b/libssh.spec @@ -38,6 +38,8 @@ Patch5: 0001-pki_crypto-Use-getters-and-setters-for-opaque-keys-a.patch Patch6: 0001-threads-Use-new-API-call-for-OpenSSL-CRYPTO-THREADID.patch Patch7: 0001-cmake-Use-configure-check-for-CRYPTO_ctr128_encrypt.patch # END of OpenSSL 1.1 support patches +# PATCH-FIX-UPSTREAM Fix parsing of config files (boo#1067782) +Patch10: 0001-config-Bugfix-Dont-skip-unseen-opcodes.patch BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ @@ -98,6 +100,7 @@ Documentation for libssh development. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch10 -p1 %build %cmake \