blob: 6b74cb6ee3009c2c55e45350e80f3893615a8b65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import commands
import os
from leap.util.fileutil import which
def is_pkexec_in_system():
pkexec_path = which('pkexec')
if not pkexec_path:
return False
return os.access(pkexec_path, os.X_OK)
def is_auth_agent_running():
return bool(
commands.getoutput(
'ps aux | grep polkit-[g]nome-authentication-agent-1'))
|