diff options
-rw-r--r-- | 0012-libssh2_agent_init-init-fd-to-LIBSSH2_INVALID_SOCKET.patch | 31 | ||||
-rw-r--r-- | libssh2.spec | 9 |
2 files changed, 39 insertions, 1 deletions
diff --git a/0012-libssh2_agent_init-init-fd-to-LIBSSH2_INVALID_SOCKET.patch b/0012-libssh2_agent_init-init-fd-to-LIBSSH2_INVALID_SOCKET.patch new file mode 100644 index 0000000..48a62e8 --- /dev/null +++ b/0012-libssh2_agent_init-init-fd-to-LIBSSH2_INVALID_SOCKET.patch @@ -0,0 +1,31 @@ +From a958624be229315ab57017040ef15c5ae072d1ac Mon Sep 17 00:00:00 2001 +From: Matthias Kerestesch <mail@kerestesch.de> +Date: Sat, 18 May 2013 23:01:35 +0200 +Subject: [PATCH] libssh2_agent_init: init ->fd to LIBSSH2_INVALID_SOCKET + +... previously it was left at 0 which is a valid file descriptor! + +Bug: https://trac.libssh2.org/ticket/265 + +Fixes #265 + +Upstream-commit: 1ad20ac7d3e21d091e7cfec58fda0afdc359360a +--- + src/agent.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/agent.c b/src/agent.c +index 1c65149..a8a5025 100644 +--- a/src/agent.c ++++ b/src/agent.c +@@ -652,6 +652,7 @@ libssh2_agent_init(LIBSSH2_SESSION *session) + return NULL; + } + memset(agent, 0, sizeof *agent); ++ agent->fd = LIBSSH2_INVALID_SOCKET; + agent->session = session; + _libssh2_list_init(&agent->head); + +-- +2.1.0 + diff --git a/libssh2.spec b/libssh2.spec index 80c5fad..1df6f32 100644 --- a/libssh2.spec +++ b/libssh2.spec @@ -12,7 +12,7 @@ Name: libssh2 Version: 1.4.3 -Release: 15%{?dist} +Release: 16%{?dist} Summary: A library implementing the SSH2 protocol Group: System Environment/Libraries License: BSD @@ -30,6 +30,7 @@ Patch8: 0008-_libssh2_channel_read-fix-data-drop-when-out-of-wind.patch Patch9: 0009-_libssh2_channel_read-Honour-window_size_initial.patch Patch10: 0010-Set-default-window-size-to-2MB.patch Patch11: 0011-channel_receive_window_adjust-store-windows-size-alw.patch +Patch12: 0012-libssh2_agent_init-init-fd-to-LIBSSH2_INVALID_SOCKET.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) BuildRequires: openssl-devel BuildRequires: zlib-devel @@ -102,6 +103,9 @@ sed -i s/4711/47%{?__isa_bits}/ tests/ssh2.{c,sh} %patch10 -p1 %patch11 -p1 +# prevent a not-connected agent from closing STDIN (#1147717) +%patch12 -p1 + # Make sshd transition appropriately if building in an SELinux environment %if !(0%{?fedora} >= 17 || 0%{?rhel} >= 7) chcon $(/usr/sbin/matchpathcon -n /etc/rc.d/init.d/sshd) tests/ssh2.sh || : @@ -176,6 +180,9 @@ rm -rf %{buildroot} %{_libdir}/pkgconfig/libssh2.pc %changelog +* Fri Oct 10 2014 Kamil Dudka <kdudka@redhat.com> 1.4.3-16 +- prevent a not-connected agent from closing STDIN (#1147717) + * Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.3-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |