Remove extra check that the system dll exists (#10244)

This commit is contained in:
Ilya 2019-08-05 21:52:18 +05:00 committed by Travis Plunk
parent 30351c8549
commit d7811c8d25
2 changed files with 2 additions and 2 deletions

1
.github/CODEOWNERS vendored
View File

@ -11,6 +11,7 @@
# Area: Security
# @TravisEz13 @PaulHigin
src/System.Management.Automation/security/wldpNativeMethods.cs @TravisEz13 @PaulHigin
# Area: Documentation
.github/ @joeyaiello @TravisEz13

View File

@ -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);
}