summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/baseapp/mainwindow.py13
-rw-r--r--src/leap/eip/conductor.py4
2 files changed, 17 insertions, 0 deletions
diff --git a/src/leap/baseapp/mainwindow.py b/src/leap/baseapp/mainwindow.py
index cbdd2d07..c54eb97f 100644
--- a/src/leap/baseapp/mainwindow.py
+++ b/src/leap/baseapp/mainwindow.py
@@ -79,6 +79,19 @@ class LeapWindow(QMainWindow):
status_signals=(self.statusChange.emit, ),
debug=self.debugmode)
+ # bunch of self checks.
+ # XXX move somewhere else alltogether.
+
+ if self.conductor.missing_vpn_keyfile is True:
+ dialog = ErrorDialog()
+ dialog.criticalMessage(
+ 'Could not find the vpn keys file',
+ 'error')
+
+ # ... btw, review pending.
+ # os.kill of subprocess fails if we have
+ # some of this errors.
+
if self.conductor.bad_keyfile_perms is True:
dialog = ErrorDialog()
dialog.criticalMessage(
diff --git a/src/leap/eip/conductor.py b/src/leap/eip/conductor.py
index 3f40f068..11b0358c 100644
--- a/src/leap/eip/conductor.py
+++ b/src/leap/eip/conductor.py
@@ -14,6 +14,7 @@ from leap.eip.config import (get_config, build_ovpn_command,
check_vpn_keys,
EIPNoPkexecAvailable,
EIPNoPolkitAuthAgentAvailable,
+ EIPInitNoKeyFileError,
EIPInitBadKeyFilePermError)
from leap.eip.vpnwatcher import EIPConnectionStatus, status_watcher
from leap.eip.vpnmanager import OpenVPNManager, ConnectionRefusedError
@@ -101,6 +102,7 @@ to be triggered for each one of them.
self.missing_pkexec = False
self.missing_auth_agent = False
self.bad_keyfile_perms = False
+ self.missing_vpn_keyfile = False
self.command = None
self.args = None
@@ -181,6 +183,8 @@ to be triggered for each one of them.
"""
try:
check_vpn_keys(self.config)
+ except EIPInitNoKeyFileError:
+ self.missing_vpn_keyfile = True
except EIPInitBadKeyFilePermError:
logger.error('error while checking vpn keys')
self.bad_keyfile_perms = True