summaryrefslogtreecommitdiff
path: root/src/vm/securitymeta.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-10 21:08:47 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-10 21:36:09 -0800
commit1f75aecd267e4d2d322ce6a812a34d6a34cae1f9 (patch)
treef0b162c6ab8b4bf5fee43ae6191c6d4b47165e8a /src/vm/securitymeta.cpp
parent6517da4563a47fb370f35c082ae709215f5d0b28 (diff)
downloadcoreclr-1f75aecd267e4d2d322ce6a812a34d6a34cae1f9.tar.gz
coreclr-1f75aecd267e4d2d322ce6a812a34d6a34cae1f9.tar.bz2
coreclr-1f75aecd267e4d2d322ce6a812a34d6a34cae1f9.zip
Remove always undefined FEATURE_CAS_POLICY
Diffstat (limited to 'src/vm/securitymeta.cpp')
-rw-r--r--src/vm/securitymeta.cpp111
1 files changed, 0 insertions, 111 deletions
diff --git a/src/vm/securitymeta.cpp b/src/vm/securitymeta.cpp
index dcb2eb765f..8bff148516 100644
--- a/src/vm/securitymeta.cpp
+++ b/src/vm/securitymeta.cpp
@@ -905,117 +905,6 @@ TypeSecurityDescriptor* TypeSecurityDescriptor::GetTypeSecurityDescriptor(Method
return pTypeSecurityDesc;
}
-#if !defined(CROSSGEN_COMPILE) && defined(FEATURE_CAS_POLICY)
-HRESULT TokenDeclActionInfo::GetDeclaredPermissionsWithCache(
- IN CorDeclSecurity action,
- OUT OBJECTREF *pDeclaredPermissions,
- OUT PsetCacheEntry **pPCE)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- }
- CONTRACTL_END;
- HRESULT hr = S_OK;
- DWORD dwActionFlag = DclToFlag((CorDeclSecurity)action);
-
- PsetCacheEntry *ptempPCE=NULL;
- TokenDeclActionInfo* pCurrentAction = this;
- for (;
- pCurrentAction;
- pCurrentAction = pCurrentAction->pNext)
- {
- if (pCurrentAction->dwDeclAction == dwActionFlag)
- {
- ptempPCE = pCurrentAction->pPCE;
- break;
- }
- }
- if (pDeclaredPermissions && pCurrentAction)
- {
- *pDeclaredPermissions = ptempPCE->CreateManagedPsetObject (action);
- }
- if (pPCE && pCurrentAction)
- {
- *pPCE = ptempPCE;
- }
-
- return hr;
-}
-
-OBJECTREF TokenDeclActionInfo::GetLinktimePermissions(OBJECTREF *prefNonCasDemands)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_COOPERATIVE;
- }
- CONTRACTL_END;
-
- OBJECTREF refCasDemands = NULL;
- GCPROTECT_BEGIN(refCasDemands);
-
- GetDeclaredPermissionsWithCache(
- dclLinktimeCheck,
- &refCasDemands, NULL);
-
- TokenDeclActionInfo::GetDeclaredPermissionsWithCache(
- dclNonCasLinkDemand,
- prefNonCasDemands, NULL);
-
- GCPROTECT_END();
- return refCasDemands;
-}
-
-void TokenDeclActionInfo::InvokeLinktimeChecks(Assembly* pCaller)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- INJECT_FAULT(COMPlusThrowOM(););
- PRECONDITION(CheckPointer(pCaller));
- }
- CONTRACTL_END;
-
-#ifdef FEATURE_MULTICOREJIT
-
- // Reset the flag to allow managed code to be called in multicore JIT background thread from this routine
- ThreadStateNCStackHolder holder(-1, Thread::TSNC_CallingManagedCodeDisabled);
-
-#endif
-
- struct gc
- {
- OBJECTREF refNonCasDemands;
- OBJECTREF refCasDemands;
- }
- gc;
- ZeroMemory(&gc, sizeof(gc));
-
- GCPROTECT_BEGIN(gc);
-
- // CAS LinkDemands
- GetDeclaredPermissionsWithCache(dclLinktimeCheck,
- &gc.refCasDemands,
- NULL);
-
- if (gc.refCasDemands != NULL)
- {
- SecurityStackWalk::LinkOrInheritanceCheck(pCaller->GetSecurityDescriptor(), gc.refCasDemands, pCaller, dclLinktimeCheck);
- }
-
- // NON CAS LinkDEMANDS (we shouldn't support this).
- GetDeclaredPermissionsWithCache(dclNonCasLinkDemand,
- &gc.refNonCasDemands,
- NULL);
-
- GCPROTECT_END();
-}
-#endif // !CROSSGEN_COMPILE && FEATURE_CAS_POLICY
void TypeSecurityDescriptor::ComputeCriticalTransparentInfo()
{