summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/vpn/privilege.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-01-23 23:07:07 +0100
committerKali Kaneko <kali@leap.se>2018-01-25 01:19:22 +0100
commitcbfd0dc8873fbfb604782faded94fc77a7ab9430 (patch)
tree79e31adeed20f9a316fa36104b3acf2dd35f8f3c /src/leap/bitmask/vpn/privilege.py
parent26d3badc31655e2258f54dbcaf0bdca5f8623e69 (diff)
[tests] workaround for functional tests in docker
polkit doesn't work inside docker.
Diffstat (limited to 'src/leap/bitmask/vpn/privilege.py')
-rw-r--r--src/leap/bitmask/vpn/privilege.py3
1 files changed, 3 insertions, 0 deletions
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():