From 7e1403dd28ec5141e7f4ca3aa6b0bb6e8b0375b0 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Tue, 26 Nov 2019 06:18:13 -0500 Subject: simplified security products: don't log guids, remove duplicate entries --- src/envsecurity.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/envsecurity.cpp') diff --git a/src/envsecurity.cpp b/src/envsecurity.cpp index 6d62728b..87db98ce 100644 --- a/src/envsecurity.cpp +++ b/src/envsecurity.cpp @@ -207,13 +207,6 @@ QString SecurityProduct::toString() const s += ", definitions outdated"; } - // all products have a guid, but the windows firewall is not actually a real - // one from wmi, it's queried independently in getWindowsFirewall() and has a - // null guid, so just don't log it - if (!m_guid.isNull()) { - s += ", " + m_guid.toString(QUuid::QUuid::WithoutBraces); - } - return s; } -- cgit v1.3.1 From 4db719a3bb0c80db8720456885489a72f4edb05b Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Tue, 26 Nov 2019 09:19:36 -0500 Subject: don't log EPT_S_NOT_REGISTERED errors, treat it as firewall disabled --- src/envsecurity.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/envsecurity.cpp') diff --git a/src/envsecurity.cpp b/src/envsecurity.cpp index 87db98ce..6f4826e7 100644 --- a/src/envsecurity.cpp +++ b/src/envsecurity.cpp @@ -383,7 +383,18 @@ std::optional getWindowsFirewall() hr = policy->get_FirewallEnabled(NET_FW_PROFILE2_PUBLIC, &enabledVariant); if (FAILED(hr)) { - log::error("get_FirewallEnabled failed, {}", formatSystemMessage(hr)); + // EPT_S_NOT_REGISTERED is "There are no more endpoints available from the + // endpoint mapper", which seems to happen sometimes on Windows 7 when the + // firewall has been disabled, so treat it as such and don't log it + // + // however the user reported the error was actually 0x800706d9, not just + // 0x6d9 (1753, what EPT_S_NOT_REGISTERED is defined to), so this is + // testing for both because it's not clear which it is and nobody can + // reproduce it + if (hr != EPT_S_NOT_REGISTERED && hr != 0x800706d9) { + log::error("get_FirewallEnabled failed, {}", formatSystemMessage(hr)); + } + return {}; } } -- cgit v1.3.1