private bool Update2(PermissionSetTriple currentTriple, FrameSecurityDescriptor fsd, bool fDeclarative) { PermissionSet denials = fsd.GetDenials(fDeclarative); if (denials != null) { currentTriple.UpdateRefused(denials); } PermissionSet permitOnly = fsd.GetPermitOnly(fDeclarative); if (permitOnly != null) { currentTriple.UpdateGrant(permitOnly); } if (fsd.GetAssertAllPossible()) { if (currentTriple.GrantSet == null) { currentTriple.GrantSet = PermissionSet.s_fullTrust; } this.UpdateTripleListAndCreateNewTriple(currentTriple, this.m_permSetTriples); currentTriple.GrantSet = PermissionSet.s_fullTrust; currentTriple.UpdateAssert(fsd.GetAssertions(fDeclarative)); return(true); } PermissionSet assertions = fsd.GetAssertions(fDeclarative); if (assertions != null) { if (assertions.IsUnrestricted()) { if (currentTriple.GrantSet == null) { currentTriple.GrantSet = PermissionSet.s_fullTrust; } this.UpdateTripleListAndCreateNewTriple(currentTriple, this.m_permSetTriples); currentTriple.GrantSet = PermissionSet.s_fullTrust; currentTriple.UpdateAssert(assertions); return(true); } PermissionSetTriple permissionSetTriple = currentTriple.UpdateAssert(assertions); if (permissionSetTriple != null) { this.EnsureTriplesListCreated(); this.m_permSetTriples.Add((object)permissionSetTriple); } } return(false); }
private bool Update2(PermissionSetTriple currentTriple, FrameSecurityDescriptor fsd, bool fDeclarative) { // Deny PermissionSet deniedPset = fsd.GetDenials(fDeclarative); if (deniedPset != null) { currentTriple.UpdateRefused(deniedPset); } // permit only PermissionSet permitOnlyPset = fsd.GetPermitOnly(fDeclarative); if (permitOnlyPset != null) { currentTriple.UpdateGrant(permitOnlyPset); } // Assert all possible if (fsd.GetAssertAllPossible()) { return(true); // halt the construction } // Assert PermissionSet assertPset = fsd.GetAssertions(fDeclarative); if (assertPset != null) { if (assertPset.IsUnrestricted()) { return(true); // halt the construction } PermissionSetTriple retTriple = currentTriple.UpdateAssert(assertPset); if (retTriple != null) { EnsureTriplesListCreated(); m_permSetTriples.Add(retTriple); } } return(false); }
[System.Security.SecurityCritical] // auto-generated private bool Update2(PermissionSetTriple currentTriple, FrameSecurityDescriptor fsd, bool fDeclarative) { // Deny PermissionSet deniedPset = fsd.GetDenials(fDeclarative); if (deniedPset != null) { currentTriple.UpdateRefused(deniedPset); } // permit only PermissionSet permitOnlyPset = fsd.GetPermitOnly(fDeclarative); if (permitOnlyPset != null) { currentTriple.UpdateGrant(permitOnlyPset); } // Assert all possible if (fsd.GetAssertAllPossible()) { // If we have no grant set, it means that the only assembly we've seen on the stack so // far is mscorlib. Since mscorlib will always be fully trusted, the grant set of the // compressed stack is also FullTrust. if (currentTriple.GrantSet == null) currentTriple.GrantSet = PermissionSet.s_fullTrust; return true; // halt the construction } // Assert PermissionSet assertPset = fsd.GetAssertions(fDeclarative); if (assertPset != null) { if (assertPset.IsUnrestricted()) { // If we have no grant set, it means that the only assembly we've seen on the stack so // far is mscorlib. Since mscorlib will always be fully trusted, the grant set of the // compressed stack is also FullTrust. if (currentTriple.GrantSet == null) currentTriple.GrantSet = PermissionSet.s_fullTrust; return true; // halt the construction } PermissionSetTriple retTriple = currentTriple.UpdateAssert(assertPset); if (retTriple != null) { EnsureTriplesListCreated(); m_permSetTriples.Add(retTriple); } } return false; }
[System.Security.SecurityCritical] // auto-generated private bool Update2(PermissionSetTriple currentTriple, FrameSecurityDescriptor fsd, bool fDeclarative) { // Deny PermissionSet deniedPset = fsd.GetDenials(fDeclarative); if (deniedPset != null) { currentTriple.UpdateRefused(deniedPset); } // permit only PermissionSet permitOnlyPset = fsd.GetPermitOnly(fDeclarative); if (permitOnlyPset != null) { currentTriple.UpdateGrant(permitOnlyPset); } // Assert all possible if (fsd.GetAssertAllPossible()) { // If we have no grant set, it means that the only assembly we've seen on the stack so // far is mscorlib. Since mscorlib will always be fully trusted, the grant set of the // compressed stack is also FullTrust. if (currentTriple.GrantSet == null) { currentTriple.GrantSet = PermissionSet.s_fullTrust; } UpdateTripleListAndCreateNewTriple(currentTriple, m_permSetTriples); currentTriple.GrantSet = PermissionSet.s_fullTrust; currentTriple.UpdateAssert(fsd.GetAssertions(fDeclarative)); return(true); } // Assert PermissionSet assertPset = fsd.GetAssertions(fDeclarative); if (assertPset != null) { if (assertPset.IsUnrestricted()) { // If we have no grant set, it means that the only assembly we've seen on the stack so // far is mscorlib. Since mscorlib will always be fully trusted, the grant set of the // compressed stack is also FullTrust. if (currentTriple.GrantSet == null) { currentTriple.GrantSet = PermissionSet.s_fullTrust; } UpdateTripleListAndCreateNewTriple(currentTriple, m_permSetTriples); currentTriple.GrantSet = PermissionSet.s_fullTrust; currentTriple.UpdateAssert(assertPset); return(true); } PermissionSetTriple retTriple = currentTriple.UpdateAssert(assertPset); if (retTriple != null) { EnsureTriplesListCreated(); m_permSetTriples.Add(retTriple); } } return(false); }
private bool Update2(PermissionSetTriple currentTriple, FrameSecurityDescriptor fsd, bool fDeclarative) { PermissionSet denials = fsd.GetDenials(fDeclarative); if (denials != null) { currentTriple.UpdateRefused(denials); } PermissionSet permitOnly = fsd.GetPermitOnly(fDeclarative); if (permitOnly != null) { currentTriple.UpdateGrant(permitOnly); } if (fsd.GetAssertAllPossible()) { if (currentTriple.GrantSet == null) { currentTriple.GrantSet = PermissionSet.s_fullTrust; } return true; } PermissionSet assertions = fsd.GetAssertions(fDeclarative); if (assertions != null) { if (assertions.IsUnrestricted()) { if (currentTriple.GrantSet == null) { currentTriple.GrantSet = PermissionSet.s_fullTrust; } return true; } PermissionSetTriple triple = currentTriple.UpdateAssert(assertions); if (triple != null) { this.EnsureTriplesListCreated(); this.m_permSetTriples.Add(triple); } } return false; }
private bool Update2(PermissionSetTriple currentTriple, FrameSecurityDescriptor fsd, bool fDeclarative) { // Deny PermissionSet deniedPset = fsd.GetDenials(fDeclarative); if (deniedPset != null) { currentTriple.UpdateRefused(deniedPset); } // permit only PermissionSet permitOnlyPset = fsd.GetPermitOnly(fDeclarative); if (permitOnlyPset != null) { currentTriple.UpdateGrant(permitOnlyPset); } // Assert all possible if (fsd.GetAssertAllPossible()) return true; // halt the construction // Assert PermissionSet assertPset = fsd.GetAssertions(fDeclarative); if (assertPset != null) { if (assertPset.IsUnrestricted()) return true; // halt the construction PermissionSetTriple retTriple = currentTriple.UpdateAssert(assertPset); if (retTriple != null) { EnsureTriplesListCreated(); m_permSetTriples.Add(retTriple); } } return false; }