summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/util/privilege_policies.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-06-12 15:55:12 -0300
committerTomás Touceda <chiiph@leap.se>2014-06-12 15:55:12 -0300
commitdea498f1e09c17b6c86519dd95ea430744ecd30d (patch)
tree2d5a7cb9d13ddf76a92848a17fceb0288dad4fd8 /src/leap/bitmask/util/privilege_policies.py
parentba12b3c46ddd4403a4f860cb18796428f2bd3ffb (diff)
parentd2fc367cc284a87d60bfdc96fcd87e257296ee02 (diff)
Merge remote-tracking branch 'refs/remotes/kali/feature/install-bitmask-root-to-local-path' into develop
Diffstat (limited to 'src/leap/bitmask/util/privilege_policies.py')
-rw-r--r--src/leap/bitmask/util/privilege_policies.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/leap/bitmask/util/privilege_policies.py b/src/leap/bitmask/util/privilege_policies.py
index 9d1e2c9a..adc3503f 100644
--- a/src/leap/bitmask/util/privilege_policies.py
+++ b/src/leap/bitmask/util/privilege_policies.py
@@ -24,6 +24,8 @@ import platform
from abc import ABCMeta, abstractmethod
+from leap.bitmask.config import flags
+
logger = logging.getLogger(__name__)
@@ -71,6 +73,8 @@ class LinuxPolicyChecker(PolicyChecker):
"""
LINUX_POLKIT_FILE = ("/usr/share/polkit-1/actions/"
"se.leap.bitmask.policy")
+ LINUX_POLKIT_FILE_BUNDLE = ("/usr/share/polkit-1/actions/"
+ "se.leap.bitmask.bundle.policy")
@classmethod
def get_polkit_path(self):
@@ -79,7 +83,8 @@ class LinuxPolicyChecker(PolicyChecker):
:rtype: str
"""
- return self.LINUX_POLKIT_FILE
+ return (self.LINUX_POLKIT_FILE_BUNDLE if flags.STANDALONE
+ else self.LINUX_POLKIT_FILE)
def is_missing_policy_permissions(self):
# FIXME this name is quite confusing, it does not have anything to do with
@@ -90,4 +95,5 @@ class LinuxPolicyChecker(PolicyChecker):
:rtype: bool
"""
- return not os.path.isfile(self.LINUX_POLKIT_FILE)
+ path = self.get_polkit_path()
+ return not os.path.isfile(path)