diff --git a/Net-SSH2-auth_agent-workaround-bug-on-libssh2_agent_disconnec.patch b/Net-SSH2-auth_agent-workaround-bug-on-libssh2_agent_disconnec.patch new file mode 100644 index 0000000..09ac354 --- /dev/null +++ b/Net-SSH2-auth_agent-workaround-bug-on-libssh2_agent_disconnec.patch @@ -0,0 +1,35 @@ +From 54ae30a67b59cc6d411b7026897e58300a4b030d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Salvador=20Fandi=C3=B1o?= +Date: Sat, 5 Dec 2015 21:35:27 +0100 +Subject: [PATCH 1/6] auth_agent: workaround bug on libssh2_agent_disconnect +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libssh2_agent_disconnect was being called twice, once directly and +other under the hood by libssh2_agent_free. Unfortunatelly, due to a +bug (reported!) on libssh2, that resulted in trying to close an +already closed file descriptor. + +This patch removes the useless explicit call. + +Signed-off-by: Petr Šabata +--- + SSH2.xs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/SSH2.xs b/SSH2.xs +index 2fc0ea2..28dab4a 100644 +--- a/SSH2.xs ++++ b/SSH2.xs +@@ -1212,7 +1212,6 @@ CODE: + } + } + } +- libssh2_agent_disconnect(agent); + } + libssh2_agent_free(agent); + } +-- +2.5.0 + diff --git a/perl-Net-SSH2.spec b/perl-Net-SSH2.spec index a426f6b..0f0b6cc 100644 --- a/perl-Net-SSH2.spec +++ b/perl-Net-SSH2.spec @@ -1,11 +1,13 @@ Name: perl-Net-SSH2 Version: 0.56 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Support for the SSH 2 protocol via libSSH2 License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Net-SSH2/ Source0: http://search.cpan.org/CPAN/authors/id/S/SA/SALVA/Net-SSH2-%{version}.tar.gz +# gh@28, rhbz#1288774 +Patch0: Net-SSH2-auth_agent-workaround-bug-on-libssh2_agent_disconnec.patch # Build BuildRequires: findutils BuildRequires: libgcrypt-devel @@ -60,6 +62,7 @@ all of the key exchanges, ciphers, and compression of libssh2. %prep %setup -q -n Net-SSH2-%{version} perl -pi -e 's|^#!perl|#!%{__perl}|' example/* +%patch0 -p1 %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 @@ -82,6 +85,9 @@ make test %{_mandir}/man3/* %changelog +* Mon Dec 07 2015 Petr Šabata - 0.56-2 +- Work around a libssh2 agent bug (#1288774) + * Mon Oct 12 2015 Jitka Plesnikova - 0.56-1 - 0.56 bump