From b3549ae8cd496bbb16b7aa67e35717b60378dbf7 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 28 Feb 2018 22:43:02 +0100 Subject: [bug] fix launching of vpn for snaps --- src/leap/bitmask/vpn/helpers/__init__.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/leap/bitmask/vpn/helpers') 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(): -- cgit v1.2.3