From 0cc95f1df0641606f0173226e6f1b9f44112f962 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Mon, 1 May 2017 17:10:39 +0200 Subject: [bug] include bitmask_helpers into the frozen binary The bundled version of bitmask is unable to find the bitmask_helpers binary. Let's include it as part of the frozen binary generated by pyinstaller. - Resolves: #8862 --- src/leap/bitmask/vpn/privilege.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask/vpn/privilege.py') diff --git a/src/leap/bitmask/vpn/privilege.py b/src/leap/bitmask/vpn/privilege.py index 9666a943..ef33337a 100644 --- a/src/leap/bitmask/vpn/privilege.py +++ b/src/leap/bitmask/vpn/privilege.py @@ -31,6 +31,8 @@ from abc import ABCMeta, abstractmethod from twisted.logger import Logger from twisted.python.procutils import which +from leap.bitmask.util import STANDALONE, here + log = Logger() @@ -38,15 +40,25 @@ flags_STANDALONE = False def install_helpers(): + cmd = 'bitmask_helpers install' + if STANDALONE: + binary_path = os.path.join(here(), "bitmask") + cmd = "%s %s" % (binary_path, cmd) + # TODO check if the command has succeeded, and display error # if failed - commands.getoutput('pkexec bitmask_helpers install') + commands.getoutput('pkexec ' + cmd) def uninstall_helpers(): + cmd = 'bitmask_helpers uninstall' + if STANDALONE: + binary_path = os.path.join(here(), "bitmask") + cmd = "%s %s" % (binary_path, cmd) + # TODO check if the command has succeeded, and display error # if failed - commands.getoutput('pkexec bitmask_helpers uninstall') + commands.getoutput('pkexec ' + cmd) class NoPolkitAuthAgentAvailable(Exception): -- cgit v1.2.3