summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/vpn/helpers')
-rw-r--r--src/leap/bitmask/vpn/helpers/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/helpers/__init__.py b/src/leap/bitmask/vpn/helpers/__init__.py
index 29e22e5d..df785057 100644
--- a/src/leap/bitmask/vpn/helpers/__init__.py
+++ b/src/leap/bitmask/vpn/helpers/__init__.py
@@ -20,7 +20,7 @@ if IS_LINUX:
from leap.bitmask.vpn.constants import BITMASK_ROOT_SYSTEM
from leap.bitmask.vpn.constants import BITMASK_ROOT_LOCAL
- from leap.bitmask.vpn.constants import OPENVPN_SYSTEM, OPENVPN_LOCAL
+ from leap.bitmask.vpn.constants import OPENVPN_SYSTEM, OPENVPN_LOCAL, OPENVPN_SNAP
from leap.bitmask.vpn.constants import POLKIT_SYSTEM, POLKIT_LOCAL
from leap.bitmask.vpn.privilege import is_pkexec_in_system
from leap.bitmask.vpn.privilege import LinuxPolicyChecker
@@ -83,18 +83,19 @@ if IS_LINUX:
if (_exists_and_can_read(BITMASK_ROOT_SYSTEM) and
helper_path_digest == digest(BITMASK_ROOT_SYSTEM)):
log.debug('global bitmask-root: %s' % os.path.isfile(BITMASK_ROOT_SYSTEM))
- log.debug('global bitmask-root: %s' % digest(BITMASK_ROOT_SYSTEM))
return True
if (_exists_and_can_read(BITMASK_ROOT_LOCAL) and
helper_path_digest == digest(BITMASK_ROOT_LOCAL)):
log.debug('local bitmask-root: %s' % os.path.isfile(BITMASK_ROOT_LOCAL))
- log.debug('local bitmask-root: %s' % digest(BITMASK_ROOT_LOCAL))
return True
log.debug('No valid bitmask-root found')
return False
def _check_openvpn():
+ if IS_SNAP:
+ return os.path.exists(OPENVPN_SNAP)
+
if os.path.exists(OPENVPN_SYSTEM):
return True