From 4c75ff68fe2b629c3f53b51a07ab20e6bfa52bf0 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Fri, 19 May 2017 13:47:15 +0200 Subject: [bug] use openvpn from bundle --- src/leap/bitmask/vpn/launchers/linux.py | 12 ++---------- src/leap/bitmask/vpn/privilege.py | 7 ++----- 2 files changed, 4 insertions(+), 15 deletions(-) (limited to 'src/leap/bitmask/vpn') diff --git a/src/leap/bitmask/vpn/launchers/linux.py b/src/leap/bitmask/vpn/launchers/linux.py index 0c3864b2..f8bb8ed3 100644 --- a/src/leap/bitmask/vpn/launchers/linux.py +++ b/src/leap/bitmask/vpn/launchers/linux.py @@ -25,6 +25,7 @@ import sys from twisted.logger import Logger +from leap.bitmask.util import STANDALONE from leap.bitmask.vpn.utils import first, force_eval from leap.bitmask.vpn.privilege import LinuxPolicyChecker from leap.bitmask.vpn.privilege import NoPkexecAvailable @@ -35,15 +36,6 @@ from leap.common.config import get_path_prefix logger = Logger() COM = commands -flags_STANDALONE = False - - -class NoPolkitAuthAgentAvailable(VPNLauncherException): - pass - - -class NoPkexecAvailable(VPNLauncherException): - pass class LinuxVPNLauncher(VPNLauncher): @@ -66,7 +58,7 @@ class LinuxVPNLauncher(VPNLauncher): class OPENVPN_BIN_PATH(object): def __call__(self): - return ("/usr/local/sbin/leap-openvpn" if flags_STANDALONE else + return ("/usr/local/sbin/leap-openvpn" if STANDALONE else "/usr/sbin/openvpn") class POLKIT_PATH(object): diff --git a/src/leap/bitmask/vpn/privilege.py b/src/leap/bitmask/vpn/privilege.py index ef33337a..2576877a 100644 --- a/src/leap/bitmask/vpn/privilege.py +++ b/src/leap/bitmask/vpn/privilege.py @@ -36,9 +36,6 @@ from leap.bitmask.util import STANDALONE, here log = Logger() -flags_STANDALONE = False - - def install_helpers(): cmd = 'bitmask_helpers install' if STANDALONE: @@ -124,7 +121,7 @@ class LinuxPolicyChecker(PolicyChecker): :rtype: str """ - return (self.LINUX_POLKIT_FILE_BUNDLE if flags_STANDALONE + return (self.LINUX_POLKIT_FILE_BUNDLE if STANDALONE else self.LINUX_POLKIT_FILE) def is_missing_policy_permissions(self): @@ -175,7 +172,7 @@ class LinuxPolicyChecker(PolicyChecker): Tries to launch policykit """ env = None - if flags_STANDALONE: + if STANDALONE: # This allows us to send to subprocess the environment configs that # works for the standalone bundle (like the PYTHONPATH) env = dict(os.environ) -- cgit v1.2.3