diff options
author | Kali Kaneko <kali@leap.se> | 2018-02-28 22:43:02 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2018-03-02 03:54:17 +0100 |
commit | b3549ae8cd496bbb16b7aa67e35717b60378dbf7 (patch) | |
tree | a82dcfd852d4419c8d712e3297756687c200a7bb /src/leap/bitmask/vpn/helpers | |
parent | 64a159436428450aec8170b49d5b3ae895560d79 (diff) |
[bug] fix launching of vpn for snaps
Diffstat (limited to 'src/leap/bitmask/vpn/helpers')
-rw-r--r-- | src/leap/bitmask/vpn/helpers/__init__.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/bitmask/vpn/helpers/__init__.py b/src/leap/bitmask/vpn/helpers/__init__.py index 8ec50999..3249456c 100644 --- a/src/leap/bitmask/vpn/helpers/__init__.py +++ b/src/leap/bitmask/vpn/helpers/__init__.py @@ -4,11 +4,15 @@ from hashlib import sha512 import os.path import sys +from twisted.logger import Logger + from leap.bitmask.vpn.constants import IS_LINUX, IS_MAC from leap.bitmask.vpn import _config from leap.bitmask.util import STANDALONE +log = Logger() + if IS_LINUX: from leap.bitmask.vpn.constants import BITMASK_ROOT_SYSTEM @@ -60,18 +64,25 @@ if IS_LINUX: _check_openvpn()) def _check_helper(): + log.debug('Checking whether helper exists') helper_path = _config.get_bitmask_helper_path() if not _exists_and_can_read(helper_path): + log.debug('Cannot read helpers') return True helper_path_digest = digest(helper_path) 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(): |