From d7811c8d2532ff65870b2b0ab435cf2316451739 Mon Sep 17 00:00:00 2001 From: Ilya Date: Mon, 5 Aug 2019 21:52:18 +0500 Subject: [PATCH] Remove extra check that the system dll exists (#10244) --- .github/CODEOWNERS | 1 + src/System.Management.Automation/security/wldpNativeMethods.cs | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 330cac7895..f1e9368cda 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,6 +11,7 @@ # Area: Security # @TravisEz13 @PaulHigin +src/System.Management.Automation/security/wldpNativeMethods.cs @TravisEz13 @PaulHigin # Area: Documentation .github/ @joeyaiello @TravisEz13 diff --git a/src/System.Management.Automation/security/wldpNativeMethods.cs b/src/System.Management.Automation/security/wldpNativeMethods.cs index b1f3060c88..af16401787 100644 --- a/src/System.Management.Automation/security/wldpNativeMethods.cs +++ b/src/System.Management.Automation/security/wldpNativeMethods.cs @@ -113,9 +113,8 @@ namespace System.Management.Automation.Security private static SystemEnforcementMode GetWldpPolicy(string path, SafeHandle handle) { // If the WLDP assembly is missing (such as windows 7 or down OS), return default/None to skip WLDP validation - if (s_hadMissingWldpAssembly || !IO.File.Exists(IO.Path.Combine(Environment.SystemDirectory, "wldp.dll"))) + if (s_hadMissingWldpAssembly) { - s_hadMissingWldpAssembly = true; return s_cachedWldpSystemPolicy.GetValueOrDefault(SystemEnforcementMode.None); }