From 2e2a915807f647528f971743e489b0052f46d288 Mon Sep 17 00:00:00 2001 From: Kevin Tegtmeier Date: Tue, 2 Apr 2013 16:27:24 -0700 Subject: [PATCH 1/3] Fix bug that leaves fds in select after EOF received --- paramiko/agent.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/paramiko/agent.py b/paramiko/agent.py index 5d04dce..1dd3063 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -130,15 +130,22 @@ class AgentProxyThread(threading.Thread): if len(data) != 0: self.__inr.send(data) else: + self._close() break elif self.__inr == fd: data = self.__inr.recv(512) if len(data) != 0: self._agent._conn.send(data) else: + self._close() break time.sleep(io_sleep) + def _close(self): + self._exit = True + self.__inr.close() + self._agent._conn.close() + class AgentLocalProxy(AgentProxyThread): """ Class to be used when wanting to ask a local SSH Agent being From 1d494eb0db49316365d9328059a8bf869c7e95c0 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 5 Apr 2013 12:58:44 -0700 Subject: [PATCH 2/3] Changelog re #154 --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index f135005..9f7805e 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,10 @@ v1.10.1 (DD MM YYYY) * #142: (Fabric #811) SFTP put of empty file will still return the attributes of the put file. Thanks to Jason R. Coombs for the patch. +* #154: (Fabric #876) Forwarded SSH agent connections left stale local pipes + lying around, which could cause local (and sometimes remote or network) + resource starvation when running many agent-using remote commands. Thanks to + Kevin Tegtmeier for catch & patch. v1.10.0 (1st Mar 2013) -------------------- From 02d071be07fef362764b13a99dd9335a668c9117 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 5 Apr 2013 13:00:19 -0700 Subject: [PATCH 3/3] Bump version to 1.10.1 --- NEWS | 4 ++-- paramiko/__init__.py | 2 +- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9f7805e..7a983ba 100644 --- a/NEWS +++ b/NEWS @@ -12,8 +12,8 @@ Issues noted as "Fabric #NN" can be found at https://github.com/fabric/fabric/. Releases ======== -v1.10.1 (DD MM YYYY) --------------------- +v1.10.1 (5th Apr 2013) +---------------------- * #142: (Fabric #811) SFTP put of empty file will still return the attributes of the put file. Thanks to Jason R. Coombs for the patch. diff --git a/paramiko/__init__.py b/paramiko/__init__.py index e2b359f..099314e 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.0" +__version__ = "1.10.1" __license__ = "GNU Lesser General Public License (LGPL)" diff --git a/setup.py b/setup.py index 9812a4f..d6caccf 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ if sys.platform == 'darwin': setup(name = "paramiko", - version = "1.10.0", + version = "1.10.1", description = "SSH2 protocol library", author = "Jeff Forcier", author_email = "jeff@bitprophet.org",