diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-03-23 12:38:37 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-03-23 13:11:31 -0700 |
commit | e8a39ef3ee0501ff62d3fc8cdb8d063e7f0d149f (patch) | |
tree | 0e694fc322211aa6721ad605f4a34f637654e55c /src/vm/domainfile.cpp | |
parent | 21cbca6a3165ac9f3e2a3c1753ac6ee023aa9443 (diff) | |
download | coreclr-e8a39ef3ee0501ff62d3fc8cdb8d063e7f0d149f.tar.gz coreclr-e8a39ef3ee0501ff62d3fc8cdb8d063e7f0d149f.tar.bz2 coreclr-e8a39ef3ee0501ff62d3fc8cdb8d063e7f0d149f.zip |
Remove special casing of platform assemblies
Diffstat (limited to 'src/vm/domainfile.cpp')
-rw-r--r-- | src/vm/domainfile.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/vm/domainfile.cpp b/src/vm/domainfile.cpp index e16f9d8ab5..3837e82a60 100644 --- a/src/vm/domainfile.cpp +++ b/src/vm/domainfile.cpp @@ -3519,6 +3519,10 @@ BOOL DomainAssembly::CheckZapSecurity(PEImage *pNativeImage) } CONTRACTL_END; +#ifdef FEATURE_CORECLR + return TRUE; +#else + // // System libraries are a special case, the security info's always OK. // @@ -3536,21 +3540,6 @@ BOOL DomainAssembly::CheckZapSecurity(PEImage *pNativeImage) return TRUE; #endif -#if defined(FEATURE_CORECLR) - // Lets first check whether the assembly is going to receive full trust - BOOL fAssemblyIsFullyTrusted = this->GetAppDomain()->IsImageFullyTrusted(pNativeImage); - - // Check if the assembly was ngen as platform - Module * pNativeModule = pNativeImage->GetLoadedLayout()->GetPersistedModuleImage(); - BOOL fImageAndDependenciesAreFullTrust = pNativeModule->m_pModuleSecurityDescriptor->IsMicrosoftPlatform(); - - // return true only if image was ngen at the same trust level as the current trust level. - // images ngen'd as fulltrust can only be loaded in fulltrust and - // non-trusted transparent assembly ngen image can only be loaded in partial trust - // ( only tranparent assemblies can be ngen'd as partial trust.....if it has critical code ngen will error out) - return (fAssemblyIsFullyTrusted == fImageAndDependenciesAreFullTrust); - -#else // FEATURE_CORECLR ETWOnStartup (SecurityCatchCall_V1, SecurityCatchCallEnd_V1); #ifdef CROSSGEN_COMPILE |