[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.1.1.4-17-ga64da71

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:28:42 CET 2014


The branch, build-baikal has been updated
       via  a64da713a8ba239cd9591b25140fce5c86598c39 (commit)
      from  850c0bb591b9fbda5176ef44427c49ee08df5661 (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                  |    1 +
 x2go/backends/terminal/_stdout.py |    3 +++
 x2go/session.py                   |   31 +++++++++++++++++++++++--------
 3 files changed, 27 insertions(+), 8 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index dfeb1d2..423304f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ python-x2go (0.1.1.5-0~x2go1) unstable; urgency=low
       is already forgotten.
     - If sound is set to false in session profile use snd_system='none' in
       terminal session.
+    - Stabilize sshfs related problems in case remote user is not in fuse group.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Tue, 19 Jul 2011 20:44:30 +0200
 
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index 19d842e..461c5f3 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -444,6 +444,9 @@ class X2goTerminalSessionSTDOUT(object):
         Initialize Paramiko/SSH reverse forwarding tunnel for X2go folder sharing.
 
         """
+        if self.session_info.username not in self.control_session._x2go_remote_group('fuse'):
+            raise x2go_exceptions.X2goUserException('remote user %s is not member of X2go server group fuse' % self.session_info.username)
+
         # start reverse SSH tunnel for sshfs (folder sharing, printing)
         ssh_transport = self.control_session.get_transport()
         if self.reverse_tunnels[self.session_info.name]['sshfs'][1] is None:
diff --git a/x2go/session.py b/x2go/session.py
index 8265409..ca0b4cb 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -270,6 +270,11 @@ class X2goSession(object):
             'faulty': self.faulty,
         }
 
+        self._SUPPORTED_SOUND = SUPPORTED_SOUND
+        self._SUPPORTED_PRINTING = SUPPORTED_PRINTING
+        self._SUPPORTED_MIMEBOX = SUPPORTED_MIMEBOX
+        self._SUPPORTED_FOLDERSHARING = SUPPORTED_FOLDERSHARING
+
         self.init_control_session()
         self.terminal_session = None
 
@@ -1020,26 +1025,36 @@ 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':
+
+                if self._SUPPORTED_SOUND and self.terminal_session.params.snd_system is not 'none':
                     self.terminal_session and not self.faulty and self.terminal_session.start_sound()
+                else:
+                    self._SUPPORTED_SOUND = False
 
-                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 and not self.faulty and self.terminal_session.start_sshfs()
+                try:
+                    if (self._SUPPORTED_PRINTING and self.printing) or \
+                       (self._SUPPORTED_MIMEBOX and self.allow_mimebox) or \
+                       (self._SUPPORTED_FOLDERSHARING and self.allow_share_local_folders):
+                        self.terminal_session and not self.faulty and self.terminal_session.start_sshfs()
+                except X2goUserException:
+                    # TODO: handle this exception as a notification hook method...
+                    self._SUPPORTED_PRINTING = False
+                    self._SUPPORTED_MIMEBOX = False
+                    self._SUPPORTED_FOLDERSHARING = False
 
                 try:
                     if SUPPORTED_PRINTING and self.printing:
                         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:
-                    pass
+                    # TODO: handle this exception as a notification hook method...
+                    self._SUPPORTED_PRINTING = False
 
-                if SUPPORTED_MIMEBOX and self.allow_mimebox:
+                if self._SUPPORTED_MIMEBOX and self.allow_mimebox:
                     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:
+                if self._SUPPORTED_FOLDERSHARING and self.share_local_folders:
                     if _control.get_transport().reverse_tunnels[self.terminal_session.get_session_name()]['sshfs'][1] is not None:
                         for _folder in self.share_local_folders:
                             self.share_local_folder(_folder)


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




More information about the x2go-commits mailing list