The branch, twofactorauth has been updated via ffada7f75b49527f55ac054620d7df024a92e16e (commit) from c5136ce01cb6e6a9fca5a220fcfad65dfd27bf6e (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/proxy/base.py | 5 ++++- x2go/backends/terminal/_stdout.py | 10 +++++++++- x2go/session.py | 3 +++ x2go/sftpserver.py | 18 +++++++++++++++--- 4 files changed, 31 insertions(+), 5 deletions(-) The diff of changes is: diff --git a/x2go/backends/proxy/base.py b/x2go/backends/proxy/base.py index 0047940..b84e69f 100644 --- a/x2go/backends/proxy/base.py +++ b/x2go/backends/proxy/base.py @@ -196,7 +196,10 @@ class X2goProxyBASE(threading.Thread): if _X2GOCLIENT_OS == 'Windows': _stdin.close() self.logger('terminating proxy: %s' % p, loglevel=log.loglevel_DEBUG) - p.terminate() + try: + p.terminate() + except WindowsError: + pass def _update_local_proxy_socket(self, port): pass diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py index 73fe7dd..ea93ef0 100644 --- a/x2go/backends/terminal/_stdout.py +++ b/x2go/backends/terminal/_stdout.py @@ -48,6 +48,7 @@ import x2go.x2go_exceptions as x2go_exceptions from x2go.cleanup import x2go_cleanup # we hide the default values from epydoc (that's why we transform them to _UNDERSCORE variables) +from x2go.defaults import X2GOCLIENT_OS as _X2GOCLIENT_OS from x2go.defaults import LOCAL_HOME as _LOCAL_HOME from x2go.defaults import CURRENT_LOCAL_USER as _CURRENT_LOCAL_USER from x2go.defaults import X2GO_CLIENT_ROOTDIR as _X2GO_CLIENT_ROOTDIR @@ -520,6 +521,7 @@ class X2goTerminalSessionSTDOUT(object): self.logger('local folder does not exist: %s' % folder_name, log.loglevel_WARN) return False + folder_name = os.path.normpath(folder_name) self.logger('sharing local folder: %s' % folder_name, log.loglevel_INFO) _auth_rsakey = self.control_session._x2go_session_auth_rsakey @@ -530,11 +532,17 @@ class X2goTerminalSessionSTDOUT(object): _tmp_io_object.write('----BEGIN RSA IDENTITY----') _tmp_io_object.write('%s %s' % (_host_rsakey.get_name(),_host_rsakey.get_base64(),)) - _x2go_key_fname = os.path.join(os.path.dirname(self.session_info.remote_container), 'ssh', 'key.z%s' % self.session_info.agent_pid) + # _x2go_key_fname must be a UniX pathn + _x2go_key_fname = '%s/%s/%s' % (os.path.dirname(self.session_info.remote_container), 'ssh', 'key.z%s' % self.session_info.agent_pid) _x2go_key_bundle = _tmp_io_object.getvalue() self.control_session._x2go_sftp_write(_x2go_key_fname, _x2go_key_bundle) + if _X2GOCLIENT_OS == 'Windows': + folder_name = folder_name.replace('\\', '/') + folder_name = folder_name.replace(':', '') + folder_name = '/windrive/%s' % folder_name + if folder_type is 'disk': cmd_line = [ 'export HOSTNAME &&', diff --git a/x2go/session.py b/x2go/session.py index f2e3173..5ba91d5 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -158,6 +158,9 @@ class X2goSession(object): self.logger('X2go terminal session parameters for profile %s:' % profile_name, log.loglevel_DEBUG) for p in self.terminal_params: self.logger(' %s: %s' % (p,self.terminal_params[p]), log.loglevel_DEBUG) + self.logger('X2go sshproxy parameters for profile %s:' % profile_name, log.loglevel_DEBUG) + for p in self.sshproxy_params: + self.logger(' %s: %s' % (p,self.sshproxy_params[p]), log.loglevel_DEBUG) if control_session is None: self.logger('initializing X2goControlSession', loglevel=log.loglevel_DEBUG) diff --git a/x2go/sftpserver.py b/x2go/sftpserver.py index db57377..deb5a93 100644 --- a/x2go/sftpserver.py +++ b/x2go/sftpserver.py @@ -80,6 +80,8 @@ class _SSHServer(paramiko.ServerInterface): Ensure proper authentication. """ + # for debugging!!! + return paramiko.AUTH_SUCCESSFUL if username == self.current_local_user: self.logger('sFTP server %s: username is %s' % (self, self.current_local_user), loglevel=log.loglevel_DEBUG) if type(key) == paramiko.RSAKey and key == self.auth_key: @@ -132,10 +134,19 @@ class _SFTPServerInterface(paramiko.SFTPServerInterface): """\ Enforce the chroot jail. """ - path = self.CHROOT + self.canonicalize(path) - path = path.replace('//','/') + if defaults.X2GOCLIENT_OS == 'Windows' and path.startswith('/windrive'): + _path_components = path.split('/') + _drive = _path_components[2] + _tail_components = (len(_path_components) > 3) and _path_components[3:] or '' + _tail = os.path.normpath('/'.join(_tail_components)) + path = os.path.join('%s:' % _drive, '/', _tail) + else: + path = os.path.normpath(os.path.join(self.CHROOT, self.canonicalize(path))) return path + def session_started(self): + print 'SESSION STARTED: %s' % self.CHROOT + def list_folder(self, path): """\ List the contents of a folder. @@ -239,6 +250,7 @@ class _SFTPServerInterface(paramiko.SFTPServerInterface): """\ Remove a file. """ + path = self._realpath(path) os.remove(path) self.logger('sFTP server %s: removing file: %s' % (self, path), loglevel=log.loglevel_DEBUG_SFTPXFER) return paramiko.SFTP_OK @@ -490,4 +502,4 @@ def x2go_rev_forward_sftpchannel_handler(chan=None, auth_key=None, logger=None): class X2goRevFwSFTPChannelThread(rforward.X2goRevFwChannelThread): pass -"""A clone of L{rforward.X2goRevFwChannelThread}.""" \ No newline at end of file +"""A clone of L{rforward.X2goRevFwChannelThread}.""" 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).