blob: e12a6c5963cdc156755211bb262c7607931db4d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
//
//
#ifndef __SECURITYDESCRIPTOR_ASSEMBLY_INL__
#define __SECURITYDESCRIPTOR_ASSEMBLY_INL__
#ifndef DACCESS_COMPILE
inline BOOL AssemblySecurityDescriptor::AlreadyPassedDemand(PsetCacheEntry *pCasDemands)
{
LIMITED_METHOD_CONTRACT;
BOOL result = false;
for (UINT index = 0; index < m_dwNumPassedDemands; index++)
{
if (m_arrPassedLinktimeDemands[index] == pCasDemands)
{
result = true;
break;
}
}
return result;
}
inline void AssemblySecurityDescriptor::TryCachePassedDemand(PsetCacheEntry *pCasDemands)
{
LIMITED_METHOD_CONTRACT;
if (m_dwNumPassedDemands <= (MAX_PASSED_DEMANDS - 1))
m_arrPassedLinktimeDemands[m_dwNumPassedDemands++] = pCasDemands;
}
#endif // !DACCESS_COMPILE
inline AssemblyLoadSecurity::AssemblyLoadSecurity() :
m_pEvidence(NULL),
m_pAdditionalEvidence(NULL),
m_pGrantSet(NULL),
m_pRefusedSet(NULL),
m_dwSpecialFlags(0),
m_fCheckLoadFromRemoteSource(false),
m_fSuppressSecurityChecks(false),
m_fPropagatingAnonymouslyHostedDynamicMethodGrant(false)
{
LIMITED_METHOD_CONTRACT;
return;
}
// Should the assembly have policy resolved on it, or should it use a pre-determined grant set
inline bool AssemblyLoadSecurity::ShouldResolvePolicy()
{
LIMITED_METHOD_CONTRACT;
return m_pGrantSet == NULL;
}
#endif // #define __SECURITYDESCRIPTOR_ASSEMBLY_INL__
|