mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Remove extra check that the system dll exists (#10244)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user