The branch, master has been updated via d4c2a7c746c1b1dd9095d533d12ea484b2839769 (commit) via 265398a755330a15787fc7aa69924648a9b528c5 (commit) from c005bbc4e71fb40b5766e4a26d63cf30dec25bd1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d4c2a7c746c1b1dd9095d533d12ea484b2839769 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 12 15:19:39 2012 +0200 Only monkey patch Python Paramiko based on the currently used Paramiko version (our monkey patches have been sent upstream, so we might not need the monkey patching for paramiko >= 1.8.0 anymore). commit 265398a755330a15787fc7aa69924648a9b528c5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Oct 12 15:18:19 2012 +0200 close agent forwarding objects explicitly ----------------------------------------------------------------------- Summary of changes: debian/changelog | 3 +++ x2go/_paramiko.py | 14 ++++++++++---- x2go/backends/control/_stdout.py | 10 ++++++++++ 3 files changed, 23 insertions(+), 4 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 8fab706..3669d8b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ python-x2go (0.2.1.0-0~x2go1) UNRELEASED; urgency=low - Make X2goClient instance available in initial X2goSession instances. - Allow post-initialization updating of forward_sshagent class property. - Enable autologin and sshproxyautologin for new session profiles. + - Only monkey patch Python Paramiko based on the currently used Paramiko + version (our monkey patches have been sent upstream, so we might not + need the monkey patching for paramiko >= 1.8.0 anymore). * /debian/rules: + Allow package build on systems with missing dh_python2. * /debian/control: diff --git a/x2go/_paramiko.py b/x2go/_paramiko.py index 8b6ecfc..5124b35 100644 --- a/x2go/_paramiko.py +++ b/x2go/_paramiko.py @@ -27,8 +27,11 @@ from utils import compare_versions PARAMIKO_VERSION = paramiko.__version__.split()[0] PARAMIKO_FEATURE = { - 'forward-ssh-agent': compare_versions(PARAMIKO_VERSION, ">=", '1.8'), + 'forward-ssh-agent': compare_versions(PARAMIKO_VERSION, ">=", '1.8.0'), 'use-compression': compare_versions(PARAMIKO_VERSION, ">=", '1.7.7.1'), + 'hash-host-entries': compare_versions(PARAMIKO_VERSION, ">=", '99'), + 'host-entries-reloadable': compare_versions(PARAMIKO_VERSION, ">=", '99'), + 'preserve-known-hosts': compare_versions(PARAMIKO_VERSION, ">=", '99'), } def _SSHClient_save_host_keys(self, filename): @@ -121,6 +124,9 @@ def _HostKeys_add(self, hostname, keytype, key, hash_hostname=True): def monkey_patch_paramiko(): - paramiko.SSHClient.save_host_keys = _SSHClient_save_host_keys - paramiko.hostkeys.HostKeys.load = _HostKeys_load - paramiko.hostkeys.HostKeys.add = _HostKeys_add + if not PARAMIKO_FEATURE['preserve-known-hosts']: + paramiko.SSHClient.save_host_keys = _SSHClient_save_host_keys + if not PARAMIKO_FEATURE['host-entries-reloadable']: + paramiko.hostkeys.HostKeys.load = _HostKeys_load + if not PARAMIKO_FEATURE['hash-host-entries']: + paramiko.hostkeys.HostKeys.add = _HostKeys_add diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py index e02fb21..e27a4af 100644 --- a/x2go/backends/control/_stdout.py +++ b/x2go/backends/control/_stdout.py @@ -209,6 +209,9 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self._published_applications_menu = {} + self.agent_chan = None + self.agent_handler = None + paramiko.SSHClient.__init__(self) if self.add_to_known_hosts: self.set_missing_host_key_policy(paramiko.AutoAddPolicy()) @@ -918,6 +921,13 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): # in any case, release out internal transport lock self._transport_lock.release() + # close SSH agent auth forwarding objects + if self.agent_handler is not None: + self.agent_handler.close() + + if self.agent_chan is not None: + self.agent_chan.close() + retval = False try: if self.get_transport() is not None: hooks/post-receive -- python-x2go.git (Python X2Go Client API) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "python-x2go.git" (Python X2Go Client API).