[X2Go-Commits] python-x2go.git - twofactorauth (branch) updated:

X2Go dev team git-admin at x2go.org
Sat Sep 14 15:56:54 CEST 2013

The branch, twofactorauth has been updated
       via  009a7d9f70834ad66f535b71ac4d1670a6009b0e (commit)
      from  c9357984185ea987a4378fba4c3b5236e440cb4c (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 -----------------------------------------------------------------

Summary of changes:
 debian/changelog |    2 ++
 x2go/session.py  |   13 ++++++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index bad9996..5e8cef8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,8 @@ python-x2go ( UNRELEASED; urgency=low
     - Do not start X2go service tunnels (audio, sshfs) if session startup failed.
     - Fix NX proxy startup post-check.
     - Force 16bit colour depth for RDP-proxy sessions.
+    - Faulty sessions (without a NX proxy fw tunnel) will get terminated whenever
+      the X2go server (SSHd) denies the tunnel setup.
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 23 Jun 2011 08:34:14 +0200
diff --git a/x2go/session.py b/x2go/session.py
index 02d78f4..89499c3 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -304,6 +304,9 @@ class X2goSession(object):
             self.logger('HOOK_forwarding_tunnel_setup_failed: Forwarding tunnel request to [%s]:%s for session %s (%s) was denied by remote X2go/SSH server. Session startup failed.' % (chain_host, chain_port, self.session_name, self.profile_name), loglevel=log.loglevel_WARN)
+        # get rid of the faulty session...
+        self.terminate()
     def HOOK_check_host_dialog(self, host, port, fingerprint='no fingerprint', fingerprint_type='RSA'):
         HOOK method: called if a host check is requested. This hook has to either return C{True} (default) or C{False}.
@@ -967,22 +970,22 @@ class X2goSession(object):
             if self.has_terminal_session() and not self.faulty:
                 if SUPPORTED_SOUND and self.terminal_session.params.snd_system is not 'none':
-                    self.terminal_session.start_sound()
+                    self.terminal_session and not self.faulty and self.terminal_session.start_sound()
                 if (SUPPORTED_PRINTING and self.printing) or \
                    (SUPPORTED_MIMEBOX and self.allow_mimebox) or \
                    (SUPPORTED_FOLDERSHARING and self.allow_share_local_folders):
-                    self.terminal_session.start_sshfs()
+                    self.terminal_session and not self.faulty and self.terminal_session.start_sshfs()
                     if SUPPORTED_PRINTING and self.printing:
-                        self.terminal_session.start_printing()
-                        self.session_environment.update({'X2GO_SPOOLDIR': self.terminal_session.get_printing_spooldir(), })
+                        self.terminal_session and not self.faulty and self.terminal_session.start_printing()
+                        self.terminal_session and not self.faulty and self.session_environment.update({'X2GO_SPOOLDIR': self.terminal_session.get_printing_spooldir(), })
                 except X2goUserException:
                 if SUPPORTED_MIMEBOX and self.allow_mimebox:
-                    self.terminal_session.start_mimebox(mimebox_extensions=self.mimebox_extensions, mimebox_action=self.mimebox_action)
+                    self.terminal_session and not self.faulty and self.terminal_session.start_mimebox(mimebox_extensions=self.mimebox_extensions, mimebox_action=self.mimebox_action)
                     self.session_environment.update({'X2GO_MIMEBOX': self.terminal_session.get_mimebox_spooldir(), })
                 if SUPPORTED_FOLDERSHARING and self.share_local_folders:

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).

More information about the x2go-commits mailing list