diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-27 16:46:08 +0900 |
commit | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch) | |
tree | e5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs | |
parent | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff) | |
download | coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2 coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip |
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs b/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs index c26852874d..ed9910e4e4 100644 --- a/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs +++ b/src/mscorlib/src/System/Runtime/InteropServices/SafeHandle.cs @@ -134,10 +134,6 @@ using System.Runtime.Versioning; // we'll do this to ensure we've cut off all attack vectors. Similarly, all // methods have a link demand to ensure untrusted code cannot directly edit // or alter a handle. -[System.Security.SecurityCritical] // auto-generated_required -#if !FEATURE_CORECLR -[SecurityPermission(SecurityAction.InheritanceDemand, UnmanagedCode=true)] -#endif public abstract class SafeHandle : CriticalFinalizerObject, IDisposable { // ! Do not add or rearrange fields as the EE depends on this layout. @@ -182,16 +178,13 @@ public abstract class SafeHandle : CriticalFinalizerObject, IDisposable _fullyInitialized = true; } -#if FEATURE_CORECLR // Migrating InheritanceDemands requires this default ctor, so we can mark it critical protected SafeHandle() { BCLDebug.Assert(false, "SafeHandle's protected default ctor should never be used!"); throw new NotImplementedException(); } -#endif - [System.Security.SecuritySafeCritical] // auto-generated ~SafeHandle() { Dispose(false); @@ -236,19 +229,16 @@ public abstract class SafeHandle : CriticalFinalizerObject, IDisposable get; } - [System.Security.SecurityCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public void Close() { Dispose(true); } - [System.Security.SecuritySafeCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public void Dispose() { Dispose(true); } - [System.Security.SecurityCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] protected virtual void Dispose(bool disposing) { @@ -266,7 +256,6 @@ public abstract class SafeHandle : CriticalFinalizerObject, IDisposable // your handle is invalid and you want to record that information. // An example is calling a syscall and getting back ERROR_INVALID_HANDLE. // This method will normally leak handles! - [System.Security.SecurityCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern void SetHandleAsInvalid(); @@ -295,7 +284,6 @@ public abstract class SafeHandle : CriticalFinalizerObject, IDisposable // when the method is interrupted prior to processing by a thread abort or // when the handle has already been (or is in the process of being) // released. - [System.Security.SecurityCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern void DangerousAddRef(ref bool success); @@ -309,7 +297,6 @@ public abstract class SafeHandle : CriticalFinalizerObject, IDisposable // constitutes a potential security hole (via handle recycling) as well as a // correctness problem -- so don't ever expose Dangerous* calls out to // untrusted code. - [System.Security.SecurityCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [MethodImplAttribute(MethodImplOptions.InternalCall)] public extern void DangerousRelease(); |