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

X2Go dev team git-admin at x2go.org
Tue Jan 7 16:19:41 CET 2014


The branch, brokerclient has been updated
       via  bbf9fa2aeb9b8b19e2ad90bf09bb4bc18addfc2f (commit)
      from  36dda749f6fccc7810173d09caad2a221d84b143 (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 |    3 ++-
 x2go/sshproxy.py                 |   45 ++++++++++++++++++++------------------
 2 files changed, 26 insertions(+), 22 deletions(-)

The diff of changes is:
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 9121587..84d1324 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -301,7 +301,8 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
                 self.sshproxy_params['sshproxy_password'] = sshproxy_password
 
             try:
-                self.sshproxy_session = sshproxy.X2goSSHProxy(add_to_known_hosts=add_to_known_hosts, 
+                add_to_known_hosts = add_to_known_hosts | self.add_to_known_hosts
+                self.sshproxy_session = sshproxy.X2goSSHProxy(add_to_known_hosts=add_to_known_hosts,
                                                               known_hosts=self.known_hosts,
                                                               logger=self.logger, **self.sshproxy_params
                                                              )
diff --git a/x2go/sshproxy.py b/x2go/sshproxy.py
index d5eafe8..035277b 100644
--- a/x2go/sshproxy.py
+++ b/x2go/sshproxy.py
@@ -110,27 +110,30 @@ class X2goSSHProxy(paramiko.SSHClient, threading.Thread):
         if add_to_known_hosts:
             self.set_missing_host_key_policy(paramiko.AutoAddPolicy())
 
-        if key_filename:
-            try:
-                self.connect(self.hostname, port=self.port, 
-                             username=self.username, 
-                             key_filename=key_filename,
-                             look_for_keys=False,
-                            )
-            except AuthenticationException, e:
-                raise X2goSSHProxyAuthenticationException('pubkey auth mechanisms both failed')
-
-        elif password:
-            try:
-                self.connect(self.hostname, port=self.port,
-                             username=self.username,
-                             password=password,
-                             look_for_keys=False,
-                            )
-            except AuthenticationException:
-                    raise X2goSSHProxyAuthenticationException('interactive auth mechanisms failed')
-        else:
-            raise X2goSSHProxyAuthenticationException('no auth mechanism available')
+        try:
+            if key_filename:
+                try:
+                    self.connect(self.hostname, port=self.port, 
+                                 username=self.username, 
+                                 key_filename=key_filename,
+                                 look_for_keys=False,
+                                )
+                except AuthenticationException, e:
+                    raise X2goSSHProxyAuthenticationException('pubkey auth mechanisms both failed')
+
+            elif password:
+                try:
+                    self.connect(self.hostname, port=self.port,
+                                 username=self.username,
+                                 password=password,
+                                 look_for_keys=False,
+                                )
+                except AuthenticationException:
+                        raise X2goSSHProxyAuthenticationException('interactive auth mechanisms failed')
+            else:
+                raise X2goSSHProxyAuthenticationException('no auth mechanism available')
+        except paramiko.SSHException, e:
+            raise X2goSSHProxyException(str(e))
 
         threading.Thread.__init__(self)
         self.daemon = True


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