diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-26 09:19:36 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-26 09:19:36 -0500 |
| commit | 4db719a3bb0c80db8720456885489a72f4edb05b (patch) | |
| tree | 680a31d3e6f5543a0da5c18115ae9fd29eb0ecbe /src | |
| parent | c65fbcdb374f688cc92080643669349766181f80 (diff) | |
don't log EPT_S_NOT_REGISTERED errors, treat it as firewall disabled
Diffstat (limited to 'src')
| -rw-r--r-- | src/envsecurity.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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<SecurityProduct> 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 {}; } } |
