diff options
Diffstat (limited to 'src/leap/bitmask/vpn/helpers')
-rw-r--r-- | src/leap/bitmask/vpn/helpers/__init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/leap/bitmask/vpn/helpers/__init__.py b/src/leap/bitmask/vpn/helpers/__init__.py index 3249456c..29e22e5d 100644 --- a/src/leap/bitmask/vpn/helpers/__init__.py +++ b/src/leap/bitmask/vpn/helpers/__init__.py @@ -1,8 +1,9 @@ +import os.path +import sys + from os import remove, chmod, access, R_OK from shutil import copyfile from hashlib import sha512 -import os.path -import sys from twisted.logger import Logger @@ -13,6 +14,8 @@ from leap.bitmask.util import STANDALONE log = Logger() +IS_SNAP = os.environ.get('SNAP') + if IS_LINUX: from leap.bitmask.vpn.constants import BITMASK_ROOT_SYSTEM @@ -70,6 +73,12 @@ if IS_LINUX: log.debug('Cannot read helpers') return True + if IS_SNAP: + if os.path.isfile(BITMASK_ROOT_LOCAL): + return True + log.error('cannot find bitmask-root in snap') + return False + helper_path_digest = digest(helper_path) if (_exists_and_can_read(BITMASK_ROOT_SYSTEM) and helper_path_digest == digest(BITMASK_ROOT_SYSTEM)): |