summaryrefslogtreecommitdiff
path: root/src/leap/bitmask
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r--src/leap/bitmask/vpn/_checks.py3
-rw-r--r--src/leap/bitmask/vpn/helpers/__init__.py1
-rw-r--r--src/leap/bitmask/vpn/privilege.py3
3 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/bitmask/vpn/_checks.py b/src/leap/bitmask/vpn/_checks.py
index 681f7428..2549e366 100644
--- a/src/leap/bitmask/vpn/_checks.py
+++ b/src/leap/bitmask/vpn/_checks.py
@@ -27,6 +27,9 @@ def get_failure_for(provider):
def is_service_ready(provider):
if not _has_valid_cert(provider):
return False
+ if os.getuid() == 0:
+ # it's your problem if you run as root, not mine.
+ return True
if IS_LINUX and not is_pkexec_in_system():
log.warn('System has no pkexec')
return False
diff --git a/src/leap/bitmask/vpn/helpers/__init__.py b/src/leap/bitmask/vpn/helpers/__init__.py
index 69b34e00..b0f6990f 100644
--- a/src/leap/bitmask/vpn/helpers/__init__.py
+++ b/src/leap/bitmask/vpn/helpers/__init__.py
@@ -62,7 +62,6 @@ if IS_LINUX:
openvpn = (os.path.exists(OPENVPN_SYSTEM) or
_is_up_to_date(_config.get_bitmask_openvpn_path(),
OPENVPN_LOCAL, ""))
-
return helper and polkit and openvpn
def _is_up_to_date(src, local, system):
diff --git a/src/leap/bitmask/vpn/privilege.py b/src/leap/bitmask/vpn/privilege.py
index 1856ec8c..9c9ce130 100644
--- a/src/leap/bitmask/vpn/privilege.py
+++ b/src/leap/bitmask/vpn/privilege.py
@@ -147,6 +147,9 @@ class LinuxPolicyChecker(object):
# Note that gnome-shell does not uses a separate process for the
# polkit-agent, it uses a polkit-agent within its own process so we
# can't ps-grep a polkit process, we can ps-grep gnome-shell itself.
+ if os.getuid() == 0:
+ # if you're running as root, it's your problem, not mine.
+ return True
running = False
for proc in psutil.process_iter():