diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-08-07 12:16:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 12:16:45 -0700 |
commit | 46ab1d132c9ad471d79afa20c188c2f9c85e5f20 (patch) | |
tree | 233ab93323e49cf4c5404e18304374a9faae74de /src/vm/clsload.hpp | |
parent | a9516dacd742ccaeae2820b89ad313a53d22d917 (diff) | |
download | coreclr-46ab1d132c9ad471d79afa20c188c2f9c85e5f20.tar.gz coreclr-46ab1d132c9ad471d79afa20c188c2f9c85e5f20.tar.bz2 coreclr-46ab1d132c9ad471d79afa20c188c2f9c85e5f20.zip |
Cleanup code access security from the unmanaged runtime (#13241)
Diffstat (limited to 'src/vm/clsload.hpp')
-rw-r--r-- | src/vm/clsload.hpp | 47 |
1 files changed, 5 insertions, 42 deletions
diff --git a/src/vm/clsload.hpp b/src/vm/clsload.hpp index 656f260e01..5a9248e422 100644 --- a/src/vm/clsload.hpp +++ b/src/vm/clsload.hpp @@ -317,7 +317,6 @@ public: virtual MethodTable* GetCallerMT() = 0; // The class that wants access; NULL if interop caller. virtual Assembly* GetCallerAssembly() = 0; // Assembly containing that class. virtual bool IsCalledFromInterop() = 0; - virtual bool IsCallerCritical() = 0; // Can we do a quick check for caller's transparency status? }; class StaticAccessCheckContext : public AccessCheckContext @@ -367,8 +366,6 @@ public: return false; } - virtual bool IsCallerCritical(); - private: MethodDesc* m_pCallerMethod; MethodTable* m_pCallerMT; @@ -429,8 +426,7 @@ public: AccessCheckOptions( const AccessCheckOptions & templateAccessCheckOptions, - BOOL throwIfTargetIsInaccessible, - BOOL skipCheckForCriticalCode = FALSE); + BOOL throwIfTargetIsInaccessible); // Follow standard rules for doing accessability BOOL DoNormalAccessibilityChecks() const @@ -471,8 +467,7 @@ private: BOOL throwIfTargetIsInaccessible, MethodTable * pTargetMT, MethodDesc * pTargetMD, - FieldDesc * pTargetFD, - BOOL skipCheckForCriticalCode = FALSE); + FieldDesc * pTargetFD); BOOL DemandMemberAccess(AccessCheckContext *pContext, MethodTable * pTargetMT, BOOL visibilityCheck) const; @@ -493,27 +488,22 @@ private: DynamicResolver * m_pAccessContext; // If the target is not accessible, should the API return FALSE, or should it throw an exception? BOOL m_fThrowIfTargetIsInaccessible; - // flag to enable legacy behavior in ClassLoader::CanAccessMemberForExtraChecks. - BOOL m_fSkipCheckForCriticalCode; }; void DECLSPEC_NORETURN ThrowFieldAccessException(MethodDesc *pCallerMD, FieldDesc *pFD, - BOOL isTransparencyError, UINT messageID = 0, Exception *pInnerException = NULL, BOOL fAccessingFrameworkCode = FALSE); void DECLSPEC_NORETURN ThrowMethodAccessException(MethodDesc *pCallerMD, MethodDesc *pCalleeMD, - BOOL isTransparencyError, UINT messageID = 0, Exception *pInnerException = NULL, BOOL fAccessingFrameworkCode = FALSE); void DECLSPEC_NORETURN ThrowTypeAccessException(MethodDesc *pCallerMD, MethodTable *pMT, - BOOL isTransparencyError, UINT messageID = 0, Exception *pInnerException = NULL, BOOL fAccessingFrameworkCode = FALSE); @@ -889,8 +879,7 @@ public: AccessCheckContext* pContext, MethodTable* pTargetClass, Assembly* pTargetAssembly, - const AccessCheckOptions & accessCheckOptions = *AccessCheckOptions::s_pNormalAccessChecks, - BOOL checkTargetTypeTransparency = TRUE); + const AccessCheckOptions & accessCheckOptions = *AccessCheckOptions::s_pNormalAccessChecks); static BOOL CanAccess( AccessCheckContext* pContext, @@ -899,16 +888,7 @@ public: DWORD dwMemberAttrs, MethodDesc* pOptionalTargetMethod, FieldDesc* pOptionalTargetField, - const AccessCheckOptions & accessCheckOptions = *AccessCheckOptions::s_pNormalAccessChecks, - BOOL checkTargetMethodTransparency = TRUE, - BOOL checkTargetTypeTransparency = TRUE); - - static BOOL CanAccessClassForExtraChecks( - AccessCheckContext* pContext, - MethodTable* pTargetClass, - Assembly* pTargetAssembly, - const AccessCheckOptions & accessCheckOptions, - BOOL checkTargetTypeTransparency); + const AccessCheckOptions & accessCheckOptions = *AccessCheckOptions::s_pNormalAccessChecks); static BOOL CanAccessFamilyVerification( TypeHandle thCurrentClass, @@ -921,21 +901,6 @@ private: MethodDesc* pOptionalTargetMethod, const AccessCheckOptions & accessCheckOptions); - static BOOL CanAccessMemberForExtraChecks( - AccessCheckContext* pContext, - MethodTable* pTargetExactMT, - MethodDesc* pOptionalTargetMethod, - FieldDesc* pOptionalTargetField, - const AccessCheckOptions & accessCheckOptions, - BOOL checkTargetMethodTransparency); - - static BOOL CanAccessSigForExtraChecks( - AccessCheckContext* pContext, - MethodDesc* pTargetMethodSig, - MethodTable* pTargetExactMT, - const AccessCheckOptions & accessCheckOptions, - BOOL checkTargetTransparency); - static BOOL CanAccessFamily( MethodTable* pCurrentClass, MethodTable* pTargetClass); @@ -947,9 +912,7 @@ private: DWORD dwMemberAttrs, MethodDesc* pOptionalTargetMethod, FieldDesc* pOptionalTargetField, - const AccessCheckOptions & accessCheckOptions = *AccessCheckOptions::s_pNormalAccessChecks, - BOOL checkTargetMethodTransparency = TRUE, - BOOL checkTargetTypeTransparency = TRUE); + const AccessCheckOptions & accessCheckOptions = *AccessCheckOptions::s_pNormalAccessChecks); public: |