From c8b75a489c569ea71b2166c6fbcc7f773397da3b Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 26 Jul 2013 15:04:16 -0700 Subject: [PATCH 1/6] Update changelog for release --- NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index efee92d..0ad9f6b 100644 --- a/NEWS +++ b/NEWS @@ -12,11 +12,11 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== -v1.10.2 (DD MM 2013) --------------------- +v1.10.2 (26th Jul 2013) +----------------------- -* #153, #67: Warn on parse failure when reading known_hosts - file. Thanks to `@glasserc` for patch. +* #153, #67: Warn on parse failure when reading known_hosts file. Thanks to + `@glasserc` for patch. * #146: Indentation fixes for readability. Thanks to Abhinav Upadhyay for catch & patch. From 965d00dee951ffaee7458c7f8cb0a3c38ff46b25 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 26 Jul 2013 15:05:35 -0700 Subject: [PATCH 2/6] Version bump --- paramiko/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paramiko/__init__.py b/paramiko/__init__.py index 099314e..6094c40 100644 --- a/paramiko/__init__.py +++ b/paramiko/__init__.py @@ -55,7 +55,7 @@ if sys.version_info < (2, 5): __author__ = "Jeff Forcier " -__version__ = "1.10.1" +__version__ = "1.10.2" __license__ = "GNU Lesser General Public License (LGPL)" diff --git a/setup.py b/setup.py index d6caccf..928941d 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ if sys.platform == 'darwin': setup(name = "paramiko", - version = "1.10.1", + version = "1.10.2", description = "SSH2 protocol library", author = "Jeff Forcier", author_email = "jeff@bitprophet.org", From 565eff8274063aa118b9cbe0231766a420de79f3 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 13:18:26 -0700 Subject: [PATCH 3/6] Apply slightly modified version of patch from #162 --- paramiko/packet.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/paramiko/packet.py b/paramiko/packet.py index 38a6d4b..be502e9 100644 --- a/paramiko/packet.py +++ b/paramiko/packet.py @@ -33,17 +33,13 @@ from paramiko.ssh_exception import SSHException, ProxyCommandFailure from paramiko.message import Message -got_r_hmac = False try: - import r_hmac - got_r_hmac = True + from r_hmac import HMAC except ImportError: - pass + from Crypto.Hash.HMAC import HMAC + def compute_hmac(key, message, digest_class): - if got_r_hmac: - return r_hmac.HMAC(key, message, digest_class).digest() - from Crypto.Hash import HMAC - return HMAC.HMAC(key, message, digest_class).digest() + return HMAC(key, message, digest_class).digest() class NeedRekeyException (Exception): From f7d74d03d9f1f6ec10b0f7df3061384afdb61b48 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 13:44:28 -0700 Subject: [PATCH 4/6] Changelog entry re #162 --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 0ad9f6b..d052ebb 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,13 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== +v1.10.3 (20th Sep 2013) +----------------------- + +* #162: Clean up HMAC module import to avoid deadlocks in certain uses of + SSHClient. Thanks to Gernot Hillier for the catch & suggested + fix. + v1.10.2 (26th Jul 2013) ----------------------- From 7ed1e2bccc545d6819f081a12abc854540823e42 Mon Sep 17 00:00:00 2001 From: Jonathan Halcrow Date: Mon, 29 Aug 2011 22:26:14 -0300 Subject: [PATCH 5/6] This fixes a Bad file descriptor error caused by attempting to access the request after it has already been closed. --- demos/forward.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demos/forward.py b/demos/forward.py index 4e10785..2a4c424 100644 --- a/demos/forward.py +++ b/demos/forward.py @@ -78,9 +78,11 @@ class Handler (SocketServer.BaseRequestHandler): if len(data) == 0: break self.request.send(data) + + peername = self.request.getpeername() chan.close() self.request.close() - verbose('Tunnel closed from %r' % (self.request.getpeername(),)) + verbose('Tunnel closed from %r' % (peername,)) def forward_tunnel(local_port, remote_host, remote_port, transport): From fa61f3c398068895e6a483e3ce1ccc684b18ff49 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 20 Sep 2013 14:13:08 -0700 Subject: [PATCH 6/6] Changelog re #36 --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index d052ebb..07ab799 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ v1.10.3 (20th Sep 2013) * #162: Clean up HMAC module import to avoid deadlocks in certain uses of SSHClient. Thanks to Gernot Hillier for the catch & suggested fix. +* #36: Fix the port-forwarding demo to avoid file descriptor errors. Thanks to + Jonathan Halcrow for catch & patch. v1.10.2 (26th Jul 2013) -----------------------