Fix parsing ssh_config
This commit is contained in:
parent
c35af15fcd
commit
8c7733e01e
32
libssh-0.7.5-fix-config-parsing.patch
Normal file
32
libssh-0.7.5-fix-config-parsing.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 5333be5988c3789e7011598995f4df90d50d84d0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
|
||||||
|
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 <poptsov.artyom@gmail.com>
|
||||||
|
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
@ -1,12 +1,14 @@
|
|||||||
Name: libssh
|
Name: libssh
|
||||||
Version: 0.7.5
|
Version: 0.7.5
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: A library implementing the SSH protocol
|
Summary: A library implementing the SSH protocol
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.libssh.org
|
URL: http://www.libssh.org
|
||||||
|
|
||||||
Source0: https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz
|
Source0: https://red.libssh.org/attachments/download/218/libssh-0.7.5.tar.xz
|
||||||
|
|
||||||
|
Patch0: libssh-0.7.5-fix-config-parsing.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
%if 0%{?fedora} > 25 || 0%{?rhel} > 7
|
%if 0%{?fedora} > 25 || 0%{?rhel} > 7
|
||||||
@ -36,7 +38,7 @@ The %{name}-devel package contains libraries and header files for developing
|
|||||||
applications that use %{name}.
|
applications that use %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
if test ! -e "obj"; then
|
if test ! -e "obj"; then
|
||||||
@ -90,6 +92,9 @@ popd
|
|||||||
%{_libdir}/libssh_threads.so
|
%{_libdir}/libssh_threads.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 29 2017 Andreas Schneider <asn@redhat.com> - 0.7.5-4
|
||||||
|
- Fix parsing ssh_config
|
||||||
|
|
||||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.5-3
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.5-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user