summaryrefslogtreecommitdiff
path: root/src/leap/eip
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-08-03 11:17:04 +0900
committerkali <kali@leap.se>2012-08-03 11:17:04 +0900
commita6416bd5e4dc57390ba0748878d229098aeca42e (patch)
treee2e2ae07db043ee7bdbf3b0f8cb7bf94873370ad /src/leap/eip
parent0bb8cca027ab32a54f6792ab1b1368e2f1845368 (diff)
added log info for polkit checks
Diffstat (limited to 'src/leap/eip')
-rw-r--r--src/leap/eip/config.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leap/eip/config.py b/src/leap/eip/config.py
index 9583720e..f0cf1d86 100644
--- a/src/leap/eip/config.py
+++ b/src/leap/eip/config.py
@@ -1,5 +1,6 @@
import ConfigParser
import grp
+import logging
import os
import platform
@@ -7,6 +8,8 @@ from leap.util.fileutil import which, mkdir_p
from leap.baseapp.permcheck import (is_pkexec_in_system,
is_auth_agent_running)
+logger = logging.getLogger(name=__name__)
+
class EIPNoPkexecAvailable(Exception):
pass
@@ -106,11 +109,18 @@ def build_ovpn_command(config, debug=False):
# XXX check for both pkexec (done)
# AND a suitable authentication
# agent running.
+ logger.info('use_pkexec set to True')
if not is_pkexec_in_system():
+ logger.error('no pkexec in system')
raise EIPNoPkexecAvailable
if not is_auth_agent_running():
+ logger.warning(
+ "no polkit auth agent found. "
+ "pkexec will use its own text "
+ "based authentication agent. "
+ "that's probably a bad idea")
raise EIPNoPolkitAuthAgentAvailable
command.append('pkexec')