The branch, master has been updated via 2eb15478ddd7b8fc737cdc8a1ba0c77e469a56bd (commit) from 81d1fe7e7ea5eedc85c96ccfdd29fca3d16fff6a (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 2eb15478ddd7b8fc737cdc8a1ba0c77e469a56bd Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sun Jun 19 21:54:11 2011 +0200 Fix SSH authentication failures (close session on failure). ----------------------------------------------------------------------- Summary of changes: debian/changelog | 5 +++-- x2go/backends/control/_stdout.py | 33 +++++++++++++++------------------ x2go/sshproxy.py | 9 +++++++++ 3 files changed, 27 insertions(+), 20 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 46fd052..026ac15 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ -python-x2go (0.1.1.1-0~x2go1) UNRELEASED; urgency=low +python-x2go (0.1.1.0-0~x2go1) UNRELEASED; urgency=low * New upstream version (0.1.1.0): - -Add X2go desktop sharing support. + - Add X2go desktop sharing support. + - Fix SSH authentication failures (close session on failure). -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Mon, 13 Jun 2011 23:24:02 +0200 diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py index 76938b8..c4738aa 100644 --- a/x2go/backends/control/_stdout.py +++ b/x2go/backends/control/_stdout.py @@ -350,13 +350,9 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): logger=self.logger, ) - except x2go_exceptions.X2goSSHProxyAuthenticationException, e: + except: self.sshproxy_session = None - raise(e) - - except x2go_exceptions.X2goSSHProxyException, e: - self.sshproxy_session = None - raise(e) + raise if self.sshproxy_session is not None: self.sshproxy_session.start() @@ -384,7 +380,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): try: self.logger('trying SSH pub/priv key authentication with server', loglevel=log.loglevel_DEBUG) paramiko.SSHClient.connect(self, hostname, port=port, username=username, pkey=pkey, - key_filename=key_filename, timeout=timeout, allow_agent=allow_agent, + key_filename=key_filename, timeout=float(timeout), allow_agent=allow_agent, look_for_keys=look_for_keys) except paramiko.AuthenticationException, e: @@ -394,19 +390,25 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('next auth mechanism we\'ll try is keyboard-interactive authentication', loglevel=log.loglevel_DEBUG) try: paramiko.SSHClient.connect(self, hostname, port=port, username=username, password=password, - timeout=timeout, allow_agent=allow_agent, + timeout=float(timeout), allow_agent=allow_agent, look_for_keys=look_for_keys) - except paramiko.AuthenticationException, e: + except: if self.sshproxy_session: self.sshproxy_session.stop_thread() self.close() - raise(e) + raise else: if self.sshproxy_session: self.sshproxy_session.stop_thread() self.close() raise(e) + except: + if self.sshproxy_session: + self.sshproxy_session.stop_thread() + self.close() + raise + # if there is not private key, we will use the given password, if any else: # create a random password if password is empty to trigger host key validity check @@ -415,17 +417,12 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient): self.logger('performing SSH keyboard-interactive authentication with server', loglevel=log.loglevel_DEBUG) try: paramiko.SSHClient.connect(self, hostname, port=port, username=username, password=password, - timeout=timeout, allow_agent=allow_agent, look_for_keys=look_for_keys) - except paramiko.AuthenticationException, e: - if self.sshproxy_session: - self.sshproxy_session.stop_thread() - self.close() - raise(e) - except x2go_exceptions.X2goHostKeyException, e: + timeout=float(timeout), allow_agent=allow_agent, look_for_keys=look_for_keys) + except: if self.sshproxy_session: self.sshproxy_session.stop_thread() self.close() - raise(e) + raise self.set_missing_host_key_policy(paramiko.RejectPolicy()) diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py index ddcd380..25da56f 100644 --- a/x2go/sshproxy.py +++ b/x2go/sshproxy.py @@ -175,6 +175,9 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread): except AuthenticationException, e: self.close() raise X2goSSHProxyAuthenticationException('pubkey auth mechanisms both failed') + except: + self.close() + raise # if there is not private key, we will use the given password, if any else: @@ -191,10 +194,16 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread): except AuthenticationException: self.close() raise X2goSSHProxyAuthenticationException('interactive auth mechanisms failed') + except: + self.close() + raise except paramiko.SSHException, e: self.close() raise X2goSSHProxyException(str(e)) + except: + self.close() + raise self.set_missing_host_key_policy(paramiko.RejectPolicy()) threading.Thread.__init__(self) 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).