summaryrefslogtreecommitdiff
path: root/src/leap/services/eip/vpnlaunchers.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-07-29 18:01:34 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-07-30 10:19:25 -0300
commit4a8b4afd158076d63aac75e1014071ee340da12b (patch)
tree5cdcfd59d8f72808d9b8228ce79355208097c08f /src/leap/services/eip/vpnlaunchers.py
parentdf200f6379608b379c5fec47ddb030b6d72ce93a (diff)
Add check for outdated polkit file. Closes #3209.
Diffstat (limited to 'src/leap/services/eip/vpnlaunchers.py')
-rw-r--r--src/leap/services/eip/vpnlaunchers.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py
index 992f0c50..7f66275d 100644
--- a/src/leap/services/eip/vpnlaunchers.py
+++ b/src/leap/services/eip/vpnlaunchers.py
@@ -39,6 +39,7 @@ from leap.config.providerconfig import ProviderConfig
from leap.services.eip.eipconfig import EIPConfig, VPNGatewaySelector
from leap.util import first
from leap.util.privilege_policies import LinuxPolicyChecker
+from leap.util import privilege_policies
logger = logging.getLogger(__name__)
@@ -238,6 +239,10 @@ class LinuxVPNLauncher(VPNLauncher):
PKEXEC_BIN = 'pkexec'
OPENVPN_BIN = 'openvpn'
+ OPENVPN_BIN_PATH = os.path.join(
+ ProviderConfig().get_path_prefix(),
+ "..", "apps", "eip", OPENVPN_BIN)
+
SYSTEM_CONFIG = "/etc/leap"
UP_DOWN_FILE = "resolv-update"
UP_DOWN_PATH = "%s/%s" % (SYSTEM_CONFIG, UP_DOWN_FILE)
@@ -258,13 +263,14 @@ class LinuxVPNLauncher(VPNLauncher):
def missing_other_files(self):
"""
'Extend' the VPNLauncher's missing_other_files to check if the polkit
- files is outdated. If the polkit file is in OTHER_FILES, exists, but is
- not up to date, it is added to the missing list.
+ files is outdated. If the polkit file that is in OTHER_FILES exists but
+ is not up to date, it is added to the missing list.
- :rtype: list
+ :returns: a list of missing files
+ :rtype: list of str
"""
missing = VPNLauncher.missing_other_files.im_func(self)
- polkit_file = LinuxPolicyChecker().get_polkit_path()
+ polkit_file = LinuxPolicyChecker.get_polkit_path()
if polkit_file not in missing:
if privilege_policies.is_policy_outdated(self.OPENVPN_BIN_PATH):
missing.append(polkit_file)