[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.2.0.10-32-gb1b4c6b

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


The branch, build-baikal has been updated
       via  b1b4c6bc2a503e903dcf2c1e19fd7e386a8213ca (commit)
      from  c8d8cf7147febea9ade38e28f9b828eda7360402 (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:
 x2go/session.py |   60 ++++++++++++++++++++++++++++++++++---------------------
 1 file changed, 37 insertions(+), 23 deletions(-)

The diff of changes is:
diff --git a/x2go/session.py b/x2go/session.py
index 0330015..7722822 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -98,19 +98,19 @@ _X2GO_SESSION_PARAMS = ('use_sshproxy', 'sshproxy_reuse_authinfo',
 """A list of allowed X2Go pure session parameters (i.e. parameters that are passed on neither to an X2goControlSession, X2goSSHProxy nor an X2goControlSession object."""
 # options of the paramiko.SSHClient().connect() method, any option that is allowed for a terminal session instance
 _X2GO_TERMINAL_PARAMS = ('geometry', 'depth', 'link', 'pack', 'dpi',
-                        'cache_type', 'kbtype', 'kblayout', 'kbvariant',
-                        'session_type', 'snd_system', 'snd_port',
-                        'cmd', 'set_session_title', 'session_title',
-                        'rdp_server', 'rdp_options', 'applications',
-                        'xdmcp_server',
-                        'rootdir', 'loglevel', 'profile_name', 'profile_id',
-                        'print_action', 'print_action_args',
-                        'convert_encoding', 'client_encoding', 'server_encoding',
-                        'proxy_options', 'published_applications', 'published_applications_no_submenus',
-                        'logger',
-                        'control_backend', 'terminal_backend', 'proxy_backend',
-                        'profiles_backend', 'settings_backend', 'printing_backend',
-                       )
+                         'cache_type', 'kbtype', 'kblayout', 'kbvariant',
+                         'session_type', 'snd_system', 'snd_port',
+                         'cmd', 'set_session_title', 'session_title',
+                         'rdp_server', 'rdp_options', 'applications',
+                         'xdmcp_server',
+                         'rootdir', 'loglevel', 'profile_name', 'profile_id',
+                         'print_action', 'print_action_args',
+                         'convert_encoding', 'client_encoding', 'server_encoding',
+                         'proxy_options', 'published_applications', 'published_applications_no_submenus',
+                         'logger',
+                         'control_backend', 'terminal_backend', 'proxy_backend',
+                         'profiles_backend', 'settings_backend', 'printing_backend',
+                        )
 """A list of allowed X2Go terminal session parameters."""
 _X2GO_SSHPROXY_PARAMS = ('sshproxy_host', 'sshproxy_port', 'sshproxy_user', 'sshproxy_password',
                          'sshproxy_key_filename', 'sshproxy_pkey',
@@ -158,8 +158,6 @@ class X2goSession(object):
                  add_to_known_hosts=False,
                  known_hosts=None,
                  forward_sshagent=False,
-                 look_for_keys=False,
-                 allow_agent=False,
                  logger=None, loglevel=log.loglevel_DEFAULT,
                  connected=False, activated=False, virgin=True, running=None, suspended=None, terminated=None, faulty=None,
                  client_instance=None,
@@ -223,10 +221,6 @@ class X2goSession(object):
         @type known_hosts: C{str}
         @param forward_sshagent: forward SSH agent authentication requests to the SSH agent on the X2Go client-side
         @type forward_sshagent: C{bool}
-        @param look_for_keys: set to C{True} to enable searching for discoverable private key files in C{~/.ssh/}
-        @type look_for_keys: C{bool}
-        @param allow_agent: set to C{True} to enable connecting to a local SSH agent for acquiring authentication information
-        @type allow_agent: C{bool}
         @param connected: manipulate session state »connected« by giving a pre-set value
         @type connected: C{bool}
         @param activated: normal leave this untouched, an activated session is a session that is about to be used
@@ -342,8 +336,6 @@ class X2goSession(object):
         self.add_to_known_hosts = add_to_known_hosts
         self.known_hosts = known_hosts
         self.forward_sshagent = forward_sshagent
-        self.look_for_keys = look_for_keys
-        self.allow_agent = allow_agent
 
         self._current_status = {
             'timestamp': time.time(),
@@ -518,8 +510,6 @@ class X2goSession(object):
             self.control_session = self.control_backend(profile_name=self.profile_name,
                                                         add_to_known_hosts=self.add_to_known_hosts,
                                                         known_hosts=self.known_hosts,
-                                                        look_for_keys=self.look_for_keys,
-                                                        allow_agent=self.allow_agent,
                                                         forward_sshagent=self.forward_sshagent,
                                                         terminal_backend=self.terminal_backend,
                                                         info_backend=self.info_backend,
@@ -1058,6 +1048,12 @@ class X2goSession(object):
                 return True
             elif self.sshproxy_params.has_key('sshproxy_pkey') and self.sshproxy_params['sshproxy_pkey']:
                 return True
+            ### FIXME -- we do not know by 100%  if this will work just by checking the presence of ,,sshproxy_look_for_keys''...
+            elif self.sshproxy_params.has_key('sshproxy_look_for_keys') and self.sshproxy_params['sshproxy_look_for_keys']:
+                return True
+            ### FIXME -- we do not know by 100% if this will work just by checking the presence of ,,sshproxy_allow_agent''...
+            elif self.sshproxy_params.has_key('sshproxy_allow_agent') and self.sshproxy_params['sshproxy_allow_agent']:
+                return True
             else:
                 return False
         else:
@@ -1093,6 +1089,24 @@ class X2goSession(object):
             else:
                 return True
 
+        # or a key auto discovery?
+        ### FIXME -- we do not know by 100% if this will work just by checking the presence of ,,look_for_keys''...
+        elif self.control_params.has_key('look_for_keys') and self.control_params['look_for_keys']:
+            _can_sshproxy_auto_connect = self.can_sshproxy_auto_connect()
+            if _can_sshproxy_auto_connect is not None:
+                return _can_sshproxy_auto_connect
+            else:
+                return True
+
+        # or a SSH agent usage?
+        ### FIXME -- we do not know by 100% if this will work just by checking the presence of ,,allow_agent''...
+        elif self.control_params.has_key('allow_agent') and self.control_params['allow_agent']:
+            _can_sshproxy_auto_connect = self.can_sshproxy_auto_connect()
+            if _can_sshproxy_auto_connect is not None:
+                return _can_sshproxy_auto_connect
+            else:
+                return True
+
         else:
             return False
     __can_auto_connect = can_auto_connect


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