From 547d5da804e06182b09d5139fb0122110a257609 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Mon, 11 Jul 2016 18:54:05 -0700 Subject: [PATCH] Made check blocking execution policy, only blocking (always returning true) on linux --- src/System.Management.Automation/engine/SecurityManagerBase.cs | 2 ++ src/System.Management.Automation/security/SecuritySupport.cs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs index a9120d27d2..3c7cee9c84 100644 --- a/src/System.Management.Automation/engine/SecurityManagerBase.cs +++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs @@ -90,10 +90,12 @@ namespace System.Management.Automation // TODO:PSL this is a workaround since the exception below // hides the internal issue of what's going on in terms of // execution policy. +#if LINUX if (Platform.IsCore) { return; } +#endif #if DEBUG diff --git a/src/System.Management.Automation/security/SecuritySupport.cs b/src/System.Management.Automation/security/SecuritySupport.cs index 755b1df4cb..857b7a1119 100644 --- a/src/System.Management.Automation/security/SecuritySupport.cs +++ b/src/System.Management.Automation/security/SecuritySupport.cs @@ -433,11 +433,12 @@ namespace System.Management.Automation // There is no signature support on non-Windows platforms (yet), when // execution reaches here, we are sure the file is under product folder +#if LINUX if (Platform.IsCore) { return true; } - +#endif // Check the file signature Signature fileSignature = SignatureHelper.GetSignature(file, null); if ((fileSignature != null) && (fileSignature.IsOSBinary))