summaryrefslogtreecommitdiff
path: root/src/vm/methodtable.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-08-07 12:16:45 -0700
committerGitHub <noreply@github.com>2017-08-07 12:16:45 -0700
commit46ab1d132c9ad471d79afa20c188c2f9c85e5f20 (patch)
tree233ab93323e49cf4c5404e18304374a9faae74de /src/vm/methodtable.cpp
parenta9516dacd742ccaeae2820b89ad313a53d22d917 (diff)
downloadcoreclr-46ab1d132c9ad471d79afa20c188c2f9c85e5f20.tar.gz
coreclr-46ab1d132c9ad471d79afa20c188c2f9c85e5f20.tar.bz2
coreclr-46ab1d132c9ad471d79afa20c188c2f9c85e5f20.zip
Cleanup code access security from the unmanaged runtime (#13241)
Diffstat (limited to 'src/vm/methodtable.cpp')
-rw-r--r--src/vm/methodtable.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/vm/methodtable.cpp b/src/vm/methodtable.cpp
index 6e6987ebf2..1088082c84 100644
--- a/src/vm/methodtable.cpp
+++ b/src/vm/methodtable.cpp
@@ -33,7 +33,6 @@
#include "fieldmarshaler.h"
#include "cgensys.h"
#include "gcheaputilities.h"
-#include "security.h"
#include "dbginterface.h"
#include "comdelegate.h"
#include "eventtrace.h"
@@ -5157,7 +5156,7 @@ void MethodTable::CheckRestore()
BOOL SatisfiesClassConstraints(TypeHandle instanceTypeHnd, TypeHandle typicalTypeHnd,
const InstantiationContext *pInstContext);
-static VOID DoAccessibilityCheck(MethodTable *pAskingMT, MethodTable *pTargetMT, UINT resIDWhy, BOOL checkTargetTypeTransparency)
+static VOID DoAccessibilityCheck(MethodTable *pAskingMT, MethodTable *pTargetMT, UINT resIDWhy)
{
CONTRACTL
{
@@ -5171,8 +5170,7 @@ static VOID DoAccessibilityCheck(MethodTable *pAskingMT, MethodTable *pTargetMT,
if (!ClassLoader::CanAccessClass(&accessContext,
pTargetMT, //the desired class
pTargetMT->GetAssembly(), //the desired class's assembly
- *AccessCheckOptions::s_pNormalAccessChecks,
- checkTargetTypeTransparency
+ *AccessCheckOptions::s_pNormalAccessChecks
))
{
SString displayName;
@@ -5221,7 +5219,7 @@ VOID DoAccessibilityCheckForConstraint(MethodTable *pAskingMT, TypeHandle thCons
}
else
{
- DoAccessibilityCheck(pAskingMT, thConstraint.GetMethodTable(), resIDWhy, FALSE);
+ DoAccessibilityCheck(pAskingMT, thConstraint.GetMethodTable(), resIDWhy);
}
}
@@ -5585,7 +5583,7 @@ void MethodTable::DoFullyLoad(Generics::RecursionGraph * const pVisited, const
// A transparenct type should not be allowed to derive from a critical type.
// However since this has never been enforced before we have many classes that
// violate this rule. Enforcing it now will be a breaking change.
- DoAccessibilityCheck(this, pParentMT, E_ACCESSDENIED, /* checkTargetTypeTransparency*/ FALSE);
+ DoAccessibilityCheck(this, pParentMT, E_ACCESSDENIED);
}
}
}
@@ -5604,7 +5602,7 @@ void MethodTable::DoFullyLoad(Generics::RecursionGraph * const pVisited, const
// A transparenct type should not be allowed to implement a critical interface.
// However since this has never been enforced before we have many classes that
// violate this rule. Enforcing it now will be a breaking change.
- DoAccessibilityCheck(this, it.GetInterface(), IDS_CLASSLOAD_INTERFACE_NO_ACCESS, /* checkTargetTypeTransparency*/ FALSE);
+ DoAccessibilityCheck(this, it.GetInterface(), IDS_CLASSLOAD_INTERFACE_NO_ACCESS);
}
}
}
@@ -5643,7 +5641,7 @@ void MethodTable::DoFullyLoad(Generics::RecursionGraph * const pVisited, const
if (fNeedAccessChecks)
{
- DoAccessibilityCheck(this, th.GetMethodTable(), E_ACCESSDENIED, FALSE);
+ DoAccessibilityCheck(this, th.GetMethodTable(), E_ACCESSDENIED);
}
}