diff options
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r-- | src/leap/bitmask/vpn/_config.py | 6 | ||||
-rw-r--r-- | src/leap/bitmask/vpn/helpers/__init__.py | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/leap/bitmask/vpn/_config.py b/src/leap/bitmask/vpn/_config.py index 421d15a..5bb61e7 100644 --- a/src/leap/bitmask/vpn/_config.py +++ b/src/leap/bitmask/vpn/_config.py @@ -22,6 +22,12 @@ if IS_LINUX: return pkg_resources.resource_filename( 'leap.bitmask.vpn.helpers.linux', 'se.leap.bitmask.bundle.policy') + def get_bitmask_openvpn_path(): + if STANDALONE: + return os.path.join(here(), "..", "apps", "vpn", + "openvpn.leap") + # else nothing, we're only shipping the openvpn binary with bundles + class _TempVPNConfig(object): """Current VPN code on bitmask depends on VPNConfig object, this temporary diff --git a/src/leap/bitmask/vpn/helpers/__init__.py b/src/leap/bitmask/vpn/helpers/__init__.py index 69a9a5f..3b7e117 100644 --- a/src/leap/bitmask/vpn/helpers/__init__.py +++ b/src/leap/bitmask/vpn/helpers/__init__.py @@ -10,14 +10,21 @@ if IS_LINUX: helper_to = '/usr/local/sbin/bitmask-root' polkit_to = '/usr/share/polkit-1/actions/se.bitmask.bundle.policy' + openvpn_to = '/usr/local/sbin/leap-openvpn' def install(): helper_from = _config.get_bitmask_helper_path() polkit_from = _config.get_bitmask_polkit_policy_path() + openvpn_from = _config.get_bitmask_openvpn_path() + copyfile(helper_from, helper_to) chmod(helper_to, 0744) + copyfile(polkit_from, polkit_to) + copyfile(openvpn_from, openvpn_to) + chmod(openvpn_to, 0700) + def uninstall(): remove(helper_to) remove(polkit_to) |