UpdateRefused() private method

private UpdateRefused ( PermissionSet in_r ) : void
in_r PermissionSet
return void
示例#1
0
        [System.Security.SecurityCritical]  // auto-generated
        private void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
        {
#if FEATURE_COMPRESSEDSTACK
            ZoneIdentityPermission z;
            UrlIdentityPermission  u;
            currentTriple.UpdateGrant(in_g, out z, out u);
            currentTriple.UpdateRefused(in_r);
            AppendZoneOrigin(z, u);
#else // !FEATURE_COMPRESEDSTACK
            currentTriple.UpdateGrant(in_g);
            currentTriple.UpdateRefused(in_r);
#endif // FEATURE_COMPRESSEDSTACK
        }
示例#2
0
        private void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
        {
            ZoneIdentityPermission z;
            UrlIdentityPermission  u;

            currentTriple.UpdateGrant(in_g, out z, out u);
            currentTriple.UpdateRefused(in_r);
            this.AppendZoneOrigin(z, u);
        }
示例#3
0
        private void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
        {
            ZoneIdentityPermission permission;
            UrlIdentityPermission  permission2;

            currentTriple.UpdateGrant(in_g, out permission, out permission2);
            currentTriple.UpdateRefused(in_r);
            this.AppendZoneOrigin(permission, permission2);
        }
示例#4
0
        [System.Security.SecurityCritical]  // auto-generated
        internal void UpdateDomainPLS(PermissionSet grantSet, PermissionSet deniedSet)
        {
            Contract.Assert(m_permSetTriples == null, "m_permSetTriples != null");
            if (m_firstPermSetTriple == null)
            {
                m_firstPermSetTriple = new PermissionSetTriple();
            }

            // update the grant and denied sets
            m_firstPermSetTriple.UpdateGrant(grantSet);
            m_firstPermSetTriple.UpdateRefused(deniedSet);
        }
示例#5
0
        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);
        }
示例#6
0
        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);
        }
示例#7
0
        [System.Security.SecurityCritical]  // auto-generated 
        private void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
        { 
#if FEATURE_COMPRESSEDSTACK 
            ZoneIdentityPermission z;
            UrlIdentityPermission u; 
            currentTriple.UpdateGrant(in_g, out z, out u);
            currentTriple.UpdateRefused(in_r);
            AppendZoneOrigin(z, u);
#else // !FEATURE_COMPRESEDSTACK 
            currentTriple.UpdateGrant(in_g);
            currentTriple.UpdateRefused(in_r); 
#endif // FEATURE_COMPRESSEDSTACK 
        }
示例#8
0
        [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;
        }
示例#9
0
        [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 void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
 {
     ZoneIdentityPermission permission;
     UrlIdentityPermission permission2;
     currentTriple.UpdateGrant(in_g, out permission, out permission2);
     currentTriple.UpdateRefused(in_r);
     this.AppendZoneOrigin(permission, permission2);
 }
 private void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
 {
     ZoneIdentityPermission z;
     UrlIdentityPermission u;
     currentTriple.UpdateGrant(in_g, out z, out u);
     currentTriple.UpdateRefused(in_r);
     AppendZoneOrigin(z, u);
 }
        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;
        }
示例#14
0
 private void Update(PermissionSetTriple currentTriple, PermissionSet in_g, PermissionSet in_r)
 {
     currentTriple.UpdateGrant(in_g);
     currentTriple.UpdateRefused(in_r);
 }