From 0e6ffc52e97b38471f752bf7b9ca5e6d7396bf89 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 3 Mar 2025 17:21:55 -0800 Subject: [PATCH] Make `SystemPolicy` public APIs visible but non-op on Unix platforms so that they can be included in `PowerShellStandard.Library` (#25051) --- src/System.Management.Automation/CoreCLR/CorePsStub.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/System.Management.Automation/CoreCLR/CorePsStub.cs b/src/System.Management.Automation/CoreCLR/CorePsStub.cs index 6f94acbc38..e439cc30ff 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsStub.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsStub.cs @@ -431,7 +431,7 @@ namespace System.Management.Automation.Security /// /// Application white listing security policies only affect Windows OSs. /// - internal sealed class SystemPolicy + public sealed class SystemPolicy { private SystemPolicy() { } @@ -455,7 +455,7 @@ namespace System.Management.Automation.Security /// /// Gets the system lockdown policy. /// - /// Always return SystemEnforcementMode.None in CSS (trusted) + /// Always return SystemEnforcementMode.None on non-Windows platforms. public static SystemEnforcementMode GetSystemLockdownPolicy() { return SystemEnforcementMode.None; @@ -464,7 +464,7 @@ namespace System.Management.Automation.Security /// /// Gets lockdown policy as applied to a file. /// - /// Always return SystemEnforcementMode.None in CSS (trusted) + /// Always return SystemEnforcementMode.None on non-Windows platforms. public static SystemEnforcementMode GetLockdownPolicy(string path, System.Runtime.InteropServices.SafeHandle handle) { return SystemEnforcementMode.None; @@ -493,7 +493,7 @@ namespace System.Management.Automation.Security /// /// How the policy is being enforced. /// - internal enum SystemEnforcementMode + public enum SystemEnforcementMode { /// Not enforced at all None = 0,