summaryrefslogtreecommitdiff
path: root/src/leap/eip/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/eip/config.py')
-rw-r--r--src/leap/eip/config.py38
1 files changed, 8 insertions, 30 deletions
diff --git a/src/leap/eip/config.py b/src/leap/eip/config.py
index 6118c9de..8e55d789 100644
--- a/src/leap/eip/config.py
+++ b/src/leap/eip/config.py
@@ -9,37 +9,15 @@ from leap.util.fileutil import (which, mkdir_p,
check_and_fix_urw_only)
from leap.baseapp.permcheck import (is_pkexec_in_system,
is_auth_agent_running)
+from leap.eip import exceptions as eip_exceptions
logger = logging.getLogger(name=__name__)
logger.setLevel('DEBUG')
-# XXX move exceptions to
-# from leap.eip import exceptions as eip_exceptions
-
-
-class EIPNoPkexecAvailable(Exception):
- pass
-
-
-class EIPNoPolkitAuthAgentAvailable(Exception):
- pass
-
-
-class EIPInitNoProviderError(Exception):
- pass
-
-
-class EIPInitBadProviderError(Exception):
- pass
-
-
-class EIPInitNoKeyFileError(Exception):
- pass
-
-
-class EIPInitBadKeyFilePermError(Exception):
- pass
-
+# XXX this has to be REMOVED
+# and all these options passed in the
+# command line --> move to build_ovpn_command
+# issue #447
OPENVPN_CONFIG_TEMPLATE = """#Autogenerated by eip-client wizard
remote {VPN_REMOTE_HOST} {VPN_REMOTE_PORT}
@@ -278,11 +256,12 @@ def build_ovpn_command(config, debug=False):
# XXX check for both pkexec (done)
# AND a suitable authentication
# agent running.
+ # (until we implement setuid helper)
logger.info('use_pkexec set to True')
if not is_pkexec_in_system():
logger.error('no pkexec in system')
- raise EIPNoPkexecAvailable
+ raise eip_exceptions.EIPNoPkexecAvailable
if not is_auth_agent_running():
logger.warning(
@@ -290,7 +269,7 @@ def build_ovpn_command(config, debug=False):
"pkexec will use its own text "
"based authentication agent. "
"that's probably a bad idea")
- raise EIPNoPolkitAuthAgentAvailable
+ raise eip_exceptions.EIPNoPolkitAuthAgentAvailable
command.append('pkexec')
@@ -312,7 +291,6 @@ def build_ovpn_command(config, debug=False):
command.append(opt)
# XXX check len and raise proper error
-
return [command[0], command[1:]]