summaryrefslogtreecommitdiff
path: root/src/vm/clsload.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-03-23 19:31:27 -0700
committerJan Kotas <jkotas@microsoft.com>2016-03-23 19:31:27 -0700
commit15c0f394827c7c9902fe5f41dd62d9be16d14ce9 (patch)
tree74de266cd6052857b8357a1d87c5c249b004cd43 /src/vm/clsload.cpp
parentb01396d16e90106e8c4e19ddbecc967d54d2690b (diff)
parent4d3b8acd161bcd5890be78af5130526575264ccc (diff)
downloadcoreclr-15c0f394827c7c9902fe5f41dd62d9be16d14ce9.tar.gz
coreclr-15c0f394827c7c9902fe5f41dd62d9be16d14ce9.tar.bz2
coreclr-15c0f394827c7c9902fe5f41dd62d9be16d14ce9.zip
Merge pull request #3888 from jkotas/platform-assemblies
Remove special casing of platform assemblies
Diffstat (limited to 'src/vm/clsload.cpp')
-rw-r--r--src/vm/clsload.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/vm/clsload.cpp b/src/vm/clsload.cpp
index dfe2f38260..533b9c698b 100644
--- a/src/vm/clsload.cpp
+++ b/src/vm/clsload.cpp
@@ -5015,8 +5015,7 @@ BOOL AccessCheckOptions::DemandMemberAccess(AccessCheckContext *pContext, Method
if (visibilityCheck && Security::IsTransparencyEnforcementEnabled())
{
// In CoreCLR RMA means visibility checks always succeed if the target is user code.
- if ((m_accessCheckType == kRestrictedMemberAccess || m_accessCheckType == kRestrictedMemberAccessNoTransparency) &&
- !Security::IsMicrosoftPlatform(pTargetMT->GetAssembly()->GetSecurityDescriptor()))
+ if (m_accessCheckType == kRestrictedMemberAccess || m_accessCheckType == kRestrictedMemberAccessNoTransparency)
return TRUE;
// Accessing private types/members in platform code.
@@ -5036,10 +5035,9 @@ BOOL AccessCheckOptions::DemandMemberAccess(AccessCheckContext *pContext, Method
MethodDesc* pCallerMD = pContext->GetCallerMethod();
- // Platform critical code is exempted from all accessibility rules, regardless of the AccessCheckType.
+ // critical code is exempted from all accessibility rules, regardless of the AccessCheckType.
if (pCallerMD != NULL &&
- !Security::IsMethodTransparent(pCallerMD)
- && Security::IsMicrosoftPlatform(pCallerMD->GetAssembly()->GetSecurityDescriptor()))
+ !Security::IsMethodTransparent(pCallerMD))
{
return TRUE;
}
@@ -5238,15 +5236,6 @@ BOOL AccessCheckOptions::DemandMemberAccessOrFail(AccessCheckContext *pContext,
return TRUE;
}
-#if defined(FEATURE_CORECLR) && defined(CROSSGEN_COMPILE)
- CONSISTENCY_CHECK_MSGF(!pContext->GetCallerAssembly()->GetManifestFile()->IsProfileAssembly(),
- ("Accessibility check failed while compiling platform assembly. Are you missing FriendAccessAllowed attribute? Caller: %s %s %s Target: %s",
- pContext->GetCallerAssembly() ? pContext->GetCallerAssembly()->GetSimpleName() : "",
- pContext->GetCallerMT() ? pContext->GetCallerMT()->GetDebugClassName() : "",
- pContext->GetCallerMethod() ? pContext->GetCallerMethod()->GetName() : "",
- pTargetMT ? pTargetMT->GetDebugClassName() : ""));
-#endif
-
if (m_fThrowIfTargetIsInaccessible)
{
ThrowAccessException(pContext, pTargetMT);