summaryrefslogtreecommitdiff
path: root/src/leap/eip/openvpnconnection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/eip/openvpnconnection.py')
-rw-r--r--src/leap/eip/openvpnconnection.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/leap/eip/openvpnconnection.py b/src/leap/eip/openvpnconnection.py
index 48252e10..4a6a495a 100644
--- a/src/leap/eip/openvpnconnection.py
+++ b/src/leap/eip/openvpnconnection.py
@@ -22,7 +22,6 @@ class OpenVPNConnection(Connection):
All related to invocation
of the openvpn binary
"""
- # Connection Methods
def __init__(self, config_file=None,
watcher_cb=None,
@@ -45,7 +44,6 @@ to be triggered for each one of them.
"""
logger.debug('init openvpn connection')
self.debug = debug
- #print('conductor:%s' % debug)
self.config_file = config_file
self.watcher_cb = watcher_cb
@@ -58,15 +56,18 @@ to be triggered for each one of them.
self.port = None
self.proto = None
+ ##################################
# XXX move all error messages
# into a more encapsulated object.
self.missing_pkexec = False
self.missing_auth_agent = False
+
self.bad_keyfile_perms = False
self.missing_vpn_keyfile = False
self.missing_provider = False
self.missing_definition = False
self.bad_provider = False
+ #################################
#XXX workaround for signaling
#the ui that we don't know how to
@@ -78,9 +79,6 @@ to be triggered for each one of them.
# XXX get autostart from config
self.autostart = True
- #self._get_or_create_config()
- self._set_ovpn_command()
- self._check_vpn_keys()
#
# management init methods
@@ -96,6 +94,11 @@ to be triggered for each one of them.
self.port = port
self.password = password
+ def run_openvpn_checks(self):
+ logger.debug('running openvpn checks')
+ self._set_ovpn_command()
+ self._check_vpn_keys()
+
def _set_ovpn_command(self):
# XXX check also for command-line --command flag
try:
@@ -103,10 +106,13 @@ to be triggered for each one of them.
debug=self.debug)
except eip_exceptions.EIPNoPolkitAuthAgentAvailable:
command = args = None
+ # XXX deprecate
self.missing_auth_agent = True
+ raise
except eip_exceptions.EIPNoPkexecAvailable:
command = args = None
self.missing_pkexec = True
+ raise
# XXX if not command, signal error.
self.command = command