From bf37bb366e7461b1e629b065dcb85a21654276a0 Mon Sep 17 00:00:00 2001 From: Saswat Padhi Date: Mon, 10 May 2021 20:23:57 +0000 Subject: [PATCH] Avoid spurious warnings when setting NetVM Qube Manager currently shows a security warning when changing the NetVM of TemplateVMs. This warning is generally useful, but not when disabling networking; for example changing the NetVM from from "default" to "none". In this chnage I suppress the warning when the NetVM for a TemplateVM is changed to "none". --- qubesmanager/settings.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index 3612d0d..1244903 100644 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -627,7 +627,14 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog): self.warn_too_much_mem_label.setVisible(True) def check_warn_templatenetvm(self): - if self.vm.klass == 'TemplateVM': + if self.vm.klass != 'TemplateVM': + return + + current_netvm = self.netVM.currentData() + if current_netvm is None: + return + + if current_netvm != qubesadmin.DEFAULT: QtWidgets.QMessageBox.warning( self, self.tr("Warning!"),