mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-24 02:04:07 +08:00
Remove extra check that the system dll exists (#10244)
This commit is contained in:
parent
30351c8549
commit
d7811c8d25
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
@ -11,6 +11,7 @@
|
||||
|
||||
# Area: Security
|
||||
# @TravisEz13 @PaulHigin
|
||||
src/System.Management.Automation/security/wldpNativeMethods.cs @TravisEz13 @PaulHigin
|
||||
|
||||
# Area: Documentation
|
||||
.github/ @joeyaiello @TravisEz13
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user