summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-05-21 10:20:43 -0300
committerIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-05-21 10:52:24 -0300
commit372a9aad068e16c0ed957fac5c081ce409dbf7e7 (patch)
treea3c036bdc885e396dadd2de348554d658b92ca75
parent0d8eb72fbe11dd9e5d59451fa4d49697213629cf (diff)
Add support for kde polkit, closes #2630
Close issue #2630 Add changes file for #2630 Add documentation to '_is_auth_agent_running' method.
-rw-r--r--changes/bug-2630_polkit-kde1
-rw-r--r--src/leap/services/eip/vpnlaunchers.py13
2 files changed, 11 insertions, 3 deletions
diff --git a/changes/bug-2630_polkit-kde b/changes/bug-2630_polkit-kde
new file mode 100644
index 00000000..e501dbb6
--- /dev/null
+++ b/changes/bug-2630_polkit-kde
@@ -0,0 +1 @@
+ o Add support for the kde polkit daemon
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py
index 540bc45e..addad959 100644
--- a/src/leap/services/eip/vpnlaunchers.py
+++ b/src/leap/services/eip/vpnlaunchers.py
@@ -124,9 +124,16 @@ def _has_updown_scripts(path):
def _is_auth_agent_running():
- return len(
- commands.getoutput(
- 'ps aux | grep polkit-[g]nome-authentication-agent-1')) > 0
+ """
+ Checks if a polkit daemon is running.
+
+ :return: True if it's running, False if it's not.
+ :rtype: boolean
+ """
+ polkit_gnome = 'ps aux | grep polkit-[g]nome-authentication-agent-1'
+ polkit_kde = 'ps aux | grep polkit-[k]de-authentication-agent-1'
+ return (len(commands.getoutput(polkit_gnome) > 0) or
+ len(commands.getoutput(polkit_kde)) > 0)
class LinuxVPNLauncher(VPNLauncher):