diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-03-08 13:15:38 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-03-08 13:15:38 -0300 |
commit | 926575bc811e8382100695a3396da7191fb43eb3 (patch) | |
tree | ed5326517f1d1d6952eb5639d82230717c381812 /src/leap/services | |
parent | 977bd769b78596346f3c999e6bdb8523dc0929e4 (diff) |
Add translation support
Also:
- Make OpenVPN use a random port every time
- Logout in parallel so the UI doesn't block
- Add the WAIT status from OpenVPN to the mainwindow displays
- Support non-unix sockets in the LinuxVPNLauncher
Diffstat (limited to 'src/leap/services')
-rw-r--r-- | src/leap/services/eip/vpn.py | 5 | ||||
-rw-r--r-- | src/leap/services/eip/vpnlaunchers.py | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/leap/services/eip/vpn.py b/src/leap/services/eip/vpn.py index 71944f50..3ec32f6f 100644 --- a/src/leap/services/eip/vpn.py +++ b/src/leap/services/eip/vpn.py @@ -31,7 +31,6 @@ from leap.services.eip.udstelnet import UDSTelnet from leap.util.check import leap_assert, leap_assert_type logger = logging.getLogger(__name__) -ON_POSIX = 'posix' in sys.builtin_module_names # TODO: abstract the thread that can be asked to quit to another @@ -103,6 +102,7 @@ class VPN(QtCore.QThread): self._send_command("signal SIGTERM") self._tn.close() self._subp.terminate() + self._subp.waitForFinished() except Exception as e: logger.debug("Could not terminate process, trying command " + "signal SIGNINT: %r" % (e,)) @@ -311,6 +311,9 @@ class VPN(QtCore.QThread): output_sofar = self._subp.readAllStandardOutput() if len(output_sofar) > 0: logger.debug(output_sofar) + output_sofar = self._subp.readAllStandardError() + if len(output_sofar) > 0: + logger.debug(output_sofar) QtCore.QThread.msleep(self.POLL_TIME) diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index 00e9c966..cf817321 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -215,8 +215,15 @@ class LinuxVPNLauncher(VPNLauncher): args += [ '--user', getpass.getuser(), - '--group', grp.getgrgid(os.getgroups()[-1]).gr_name, - '--management-client-user', getpass.getuser(), + '--group', grp.getgrgid(os.getgroups()[-1]).gr_name + ] + + if socket_port == "unix": + args += [ + '--management-client-user', getpass.getuser() + ] + + args += [ '--management-signal', '--management', socket_host, socket_port, '--script-security', '2' |