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

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


The branch, twofactorauth has been updated
       via  41cd50d20fa5d23ea0d17bc8462f415fa07da35e (commit)
      from  2fff2472803efca1bafb8d37731cf588adf82cdf (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/backends/control/_stdout.py |    5 +++++
 x2go/cache.py                    |    4 ++--
 x2go/client.py                   |    9 ++++++---
 x2go/guardian.py                 |    4 ++--
 x2go/printactions.py             |    4 ++--
 x2go/printqueue.py               |    2 +-
 x2go/registry.py                 |    4 ++++
 x2go/session.py                  |    4 +++-
 x2go/sshproxy.py                 |    4 ++--
 9 files changed, 27 insertions(+), 13 deletions(-)

The diff of changes is:
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 471b55e..06139f9 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -80,6 +80,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
 
     def __init__(self,
                  profile_name='UNKNOWN',
+                 add_to_known_hosts=False,
                  known_hosts=None,
                  terminal_backend=_X2goTerminalSession,
                  info_backend=_X2goServerSessionInfo,
@@ -104,6 +105,7 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         self.profile_name = profile_name
         self.hostname = None
         self.port = None
+        self.add_to_known_hosts = add_to_known_hosts
         self.known_hosts = known_hosts
 
         self.use_sshproxy = use_sshproxy
@@ -133,6 +135,9 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
 
         paramiko.SSHClient.__init__(self, *args, **kwargs)
 
+        if self.add_to_known_hosts:
+            self.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+
         if self.known_hosts is not None:
             self.load_host_keys(known_hosts)
 
diff --git a/x2go/cache.py b/x2go/cache.py
index 7010613..fd24d03 100644
--- a/x2go/cache.py
+++ b/x2go/cache.py
@@ -40,8 +40,8 @@ class X2goListSessionsCache(object):
 
     def __init__(self, client_instance, logger=None, loglevel=log.loglevel_DEFAULT):
         """\
-        @param client: the L{X2goClient} instance that uses this L{X2goListSessionsCache}
-        @type client: C{instance}
+        @param client_instance: the L{X2goClient} instance that uses this L{X2goListSessionsCache}
+        @type client_instance: C{instance}
         @param logger: you can pass an L{X2goLogger} object to the L{X2goListSessionsCache} constructor
         @type logger: C{instance}
         @param loglevel: if no L{X2goLogger} object has been supplied a new one will be
diff --git a/x2go/client.py b/x2go/client.py
index 1d5d659..b39958b 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -433,7 +433,8 @@ class X2goClient(object):
         return sessions
 
     def register_session(self, server=None, profile_id=None, profile_name=None, session_name=None,
-                         printing=False, share_local_folders=[], return_object=False, 
+                         printing=False, share_local_folders=[], return_object=False,
+                         add_to_known_hosts=False, known_hosts=None,
                          force=False, **kwargs):
         """\
         Register a new X2go client session. Within one X2goClient 
@@ -534,6 +535,8 @@ class X2goClient(object):
                                                       sessions_rootdir=self.sessions_rootdir,
                                                       ssh_rootdir=self.ssh_rootdir,
                                                       keep_controlsession_alive=True,
+                                                      add_to_known_hosts=add_to_known_hosts,
+                                                      known_hosts=known_hosts,
                                                       **_params)
 
         self.logger('initializing X2go session...', log.loglevel_NOTICE, tag=self._logger_tag)
@@ -642,8 +645,8 @@ class X2goClient(object):
                         password='',
                         sshproxy_user='',
                         sshproxy_password='',
-                        add_to_known_hosts=None,
-                        force_password_auth=None):
+                        add_to_known_hosts=False,
+                        force_password_auth=False):
         """\
         Connect to a registered X2go session with registry hash C{<session_uuid>}. 
         This method basically wraps around paramiko.SSHClient.connect() for the 
diff --git a/x2go/guardian.py b/x2go/guardian.py
index f55dd4f..f10c39a 100644
--- a/x2go/guardian.py
+++ b/x2go/guardian.py
@@ -57,8 +57,8 @@ class X2goSessionGuardian(threading.Thread):
                  refresh_interval=5,
                  logger=None, loglevel=log.loglevel_DEFAULT):
         """\
-        @param enable_cache: let L{X2goSessionGuardian} refresh the session list cache for all L{X2goSession} objects
-        @type enable_cache: C{bool}
+        @param auto_update_listsessions_cache: let L{X2goSessionGuardian} refresh the session list cache for all L{X2goSession} objects
+        @type auto_update_listsessions_cache: C{bool}
         @param logger: you can pass an L{X2goLogger} object to the L{X2goSessionGuardian} constructor
         @type logger: C{instance}
         @param loglevel: if no L{X2goLogger} object has been supplied a new one will be
diff --git a/x2go/printactions.py b/x2go/printactions.py
index a895161..b171b52 100644
--- a/x2go/printactions.py
+++ b/x2go/printactions.py
@@ -361,10 +361,10 @@ class X2goPrintActionDIALOG(X2goPrintAction):
 
     def __init__(self, client_instance=None, logger=None, loglevel=log.loglevel_DEFAULT):
         """\
-        @param client: an L{X2goClient} instance, within your customized L{X2goClient} make sure 
+        @param client_instance: an L{X2goClient} instance, within your customized L{X2goClient} make sure 
             you have a C{HOOK_open_print_dialog(filename=<str>)} method defined that will actually
             open the print dialog.
-        @type client: C{instance}
+        @type client_instance: C{instance}
         @param logger: you can pass an L{X2goLogger} object to the
             L{X2goPrintAction} constructor
         @type logger: C{instance}
diff --git a/x2go/printqueue.py b/x2go/printqueue.py
index 4706e96..9d2f250 100644
--- a/x2go/printqueue.py
+++ b/x2go/printqueue.py
@@ -63,7 +63,7 @@ class X2goPrintQueue(threading.Thread):
         @type print_action: C{str} or instance
         @param print_action_args: depending of the chosen C{print_action} this dictionary may contain different
             values; the C{print_action_args} will be passed on to the X2go print action instance constructor, so 
-            refer to either of these: L{X2goPrintActionPDFVIEW.__init__()}, L{X2goPrintActionPRINT.__init__()} et al.
+            refer to either of these: L{X2goPrintActionPDFVIEW}, L{X2goPrintActionPRINT} et al.
         @param printing_backend: the client printing configuration backend class
         @type printing_backend: C{instance}
         @param logger: you can pass an L{X2goLogger} object to the
diff --git a/x2go/registry.py b/x2go/registry.py
index ac600e3..0f7ace3 100644
--- a/x2go/registry.py
+++ b/x2go/registry.py
@@ -260,6 +260,8 @@ class X2goSessionRegistry(object):
                  sessions_rootdir=os.path.join(_LOCAL_HOME,_X2GO_SESSIONS_ROOTDIR),
                  ssh_rootdir=os.path.join(_LOCAL_HOME,_X2GO_SSH_ROOTDIR),
                  keep_controlsession_alive=True,
+                 add_to_known_hosts=False,
+                 known_hosts=None,
                  **kwargs):
         """\
         STILL UNDOCUMENTED
@@ -329,6 +331,8 @@ class X2goSessionRegistry(object):
                                 sessions_rootdir=sessions_rootdir,
                                 ssh_rootdir=ssh_rootdir,
                                 keep_controlsession_alive=keep_controlsession_alive,
+                                add_to_known_hosts=add_to_known_hosts,
+                                known_hosts=known_hosts,
                                 logger=self.logger, **kwargs)
 
         session_uuid = s._X2goSession__get_uuid()
diff --git a/x2go/session.py b/x2go/session.py
index 8967ef4..f2e3173 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -86,6 +86,7 @@ class X2goSession(object):
                  client_rootdir=os.path.join(_LOCAL_HOME, _X2GO_CLIENT_ROOTDIR),
                  sessions_rootdir=os.path.join(_LOCAL_HOME, _X2GO_SESSIONS_ROOTDIR),
                  ssh_rootdir=os.path.join(_LOCAL_HOME, _X2GO_SSH_ROOTDIR),
+                 add_to_known_hosts=False,
                  known_hosts=None,
                  keep_controlsession_alive=False,
                  logger=None, loglevel=log.loglevel_DEFAULT,
@@ -161,6 +162,7 @@ class X2goSession(object):
         if control_session is None:
             self.logger('initializing X2goControlSession', loglevel=log.loglevel_DEBUG)
             self.control_session = control_backend(profile_name=self.profile_name,
+                                                   add_to_known_hosts=add_to_known_hosts,
                                                    known_hosts=known_hosts,
                                                    terminal_backend=terminal_backend,
                                                    info_backend=info_backend,
@@ -376,7 +378,7 @@ class X2goSession(object):
         return self.terminal_session is not None
     __has_terminal_session = has_terminal_session
 
-    def connect(self, username='', password='', add_to_known_hosts=None, force_password_auth=None,
+    def connect(self, username='', password='', add_to_known_hosts=False, force_password_auth=False,
                 sshproxy_user='', sshproxy_password=''):
         """\
         Connect to a registered X2go session with registry hash C{<session_uuid>}.
diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py
index 2bbcc55..c879bff 100644
--- a/x2go/sshproxy.py
+++ b/x2go/sshproxy.py
@@ -18,7 +18,7 @@
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 """\
-X2goProxyBASE class - proxying your connection through NX3 and others.
+L{X2goSSHProxy} class - providing a forwarding tunnel for connecting to servers behind firewalls.
 
 """
 __NAME__ = 'x2gosshproxy-pylib'
@@ -59,7 +59,7 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
         STILL UNDOCUMENTED
 
         @param logger: you can pass an L{X2goLogger} object to the
-            L{X2goProxy} constructor
+            L{X2goSSHProxy} constructor
         @type logger: L{X2goLogger} instance
         @param loglevel: if no L{X2goLogger} object has been supplied a new one will be
             constructed with the given loglevel


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