Exemplo n.º 1
0
 /// <summary>Removes the specified Access Control Entry (ACE) from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object. Use this method for directory object Access Control Lists (ACLs) when specifying the object type or the inherited object type for the ACE to be removed.</summary>
 /// <param name="accessType">The type of access control (allow or deny) to remove.</param>
 /// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an ACE.</param>
 /// <param name="accessMask">The access mask for the ACE to be removed.</param>
 /// <param name="inheritanceFlags">Flags that specify the inheritance properties of the ACE to be removed.</param>
 /// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the ACE to be removed.</param>
 /// <param name="objectFlags">Flags that specify if the <paramref name="objectType" /> and <paramref name="inheritedObjectType" /> parameters contain non-<see langword="null" /> values.</param>
 /// <param name="objectType">The identity of the class of objects to which the removed ACE applies.</param>
 /// <param name="inheritedObjectType">The identity of the class of child objects which can inherit the removed ACE.</param>
 // Token: 0x06001EF3 RID: 7923 RVA: 0x0006CFE8 File Offset: 0x0006B1E8
 public void RemoveAccessSpecific(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
 {
     if (!base.IsDS)
     {
         throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_OnlyValidForDS"));
     }
     base.CheckAccessType(accessType);
     this.everyOneFullAccessForNullDacl = false;
     base.RemoveQualifiedAcesSpecific(sid, (accessType == AccessControlType.Allow) ? AceQualifier.AccessAllowed : AceQualifier.AccessDenied, accessMask, GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), objectFlags, objectType, inheritedObjectType);
 }
Exemplo n.º 2
0
 /// <summary>Removes the specified access control rule from the current <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> object.</summary>
 /// <param name="accessType">The type of access control (allow or deny) to remove.</param>
 /// <param name="sid">The <see cref="T:System.Security.Principal.SecurityIdentifier" /> for which to remove an access control rule.</param>
 /// <param name="accessMask">The access mask for the rule to be removed.</param>
 /// <param name="inheritanceFlags">Flags that specify the inheritance properties of the rule to be removed.</param>
 /// <param name="propagationFlags">Flags that specify the inheritance propagation properties for the rule to be removed.</param>
 /// <returns>
 ///     <see langword="true" /> if this method successfully removes the specified access; otherwise, <see langword="false" />.</returns>
 // Token: 0x06001EEA RID: 7914 RVA: 0x0006CD78 File Offset: 0x0006AF78
 public bool RemoveAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     base.CheckAccessType(accessType);
     this.everyOneFullAccessForNullDacl = false;
     return(base.RemoveQualifiedAces(sid, (accessType == AccessControlType.Allow) ? AceQualifier.AccessAllowed : AceQualifier.AccessDenied, accessMask, GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), false, ObjectAceFlags.None, Guid.Empty, Guid.Empty));
 }
Exemplo n.º 3
0
 public void SetAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
 {
     if (!base.IsDS)
     {
         throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_OnlyValidForDS"));
     }
     base.CheckFlags(inheritanceFlags, propagationFlags);
     base.SetQualifiedAce(sid, AceQualifier.SystemAudit, accessMask, (AceFlags)((byte)(GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags))), objectFlags, objectType, inheritedObjectType);
 }
Exemplo n.º 4
0
 /// <summary>为指定的 <see cref="T:System.Security.Principal.SecurityIdentifier" /> 对象设置指定的访问控制。</summary>
 /// <param name="accessType">要设置的访问控制类型(允许或拒绝)。</param>
 /// <param name="sid">要为其设置 ACE 的 <see cref="T:System.Security.Principal.SecurityIdentifier" />。</param>
 /// <param name="accessMask">新 ACE 的访问规则。</param>
 /// <param name="inheritanceFlags">指定新 ACE 的继承属性的标志。</param>
 /// <param name="propagationFlags">指定新 ACE 的继承传播属性的标志。</param>
 public void SetAccess(AccessControlType accessType, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     this.CheckAccessType(accessType);
     this.CheckFlags(inheritanceFlags, propagationFlags);
     this.everyOneFullAccessForNullDacl = false;
     this.SetQualifiedAce(sid, accessType == AccessControlType.Allow ? AceQualifier.AccessAllowed : AceQualifier.AccessDenied, accessMask, GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), ObjectAceFlags.None, Guid.Empty, Guid.Empty);
 }
Exemplo n.º 5
0
 public void SetAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     base.CheckFlags(inheritanceFlags, propagationFlags);
     base.SetQualifiedAce(sid, AceQualifier.SystemAudit, accessMask, (AceFlags)((byte)(GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags))), ObjectAceFlags.None, Guid.Empty, Guid.Empty);
 }
Exemplo n.º 6
0
 public bool RemoveAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     return(base.RemoveQualifiedAces(sid, AceQualifier.SystemAudit, accessMask, (AceFlags)((byte)(GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags))), true, ObjectAceFlags.None, Guid.Empty, Guid.Empty));
 }
Exemplo n.º 7
0
 /// <summary>从当前 <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> 对象移除指定的审核规则。</summary>
 /// <param name="auditFlags">要移除的审核规则的类型。</param>
 /// <param name="sid">要为其移除审核规则的 <see cref="T:System.Security.Principal.SecurityIdentifier" />。</param>
 /// <param name="accessMask">要移除的规则的访问掩码。</param>
 /// <param name="inheritanceFlags">指定要移除的规则的继承属性的标志。</param>
 /// <param name="propagationFlags">指定要移除的规则的继承传播属性的标志。</param>
 public void RemoveAuditSpecific(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     this.RemoveQualifiedAcesSpecific(sid, AceQualifier.SystemAudit, accessMask, GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), ObjectAceFlags.None, Guid.Empty, Guid.Empty);
 }
Exemplo n.º 8
0
 /// <summary>将一个审核规则添加到当前 <see cref="T:System.Security.AccessControl.SystemAcl" /> 对象。</summary>
 /// <param name="auditFlags">要添加的审核规则的类型。</param>
 /// <param name="sid">要为其添加审核规则的 <see cref="T:System.Security.Principal.SecurityIdentifier" />。</param>
 /// <param name="accessMask">新审核规则的访问掩码。</param>
 /// <param name="inheritanceFlags">指定新审核规则的继承属性的标志。</param>
 /// <param name="propagationFlags">指定新审核规则的继承传播属性的标志。</param>
 public void AddAudit(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
 {
     this.CheckFlags(inheritanceFlags, propagationFlags);
     this.AddQualifiedAce(sid, AceQualifier.SystemAudit, accessMask, GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), ObjectAceFlags.None, Guid.Empty, Guid.Empty);
 }
Exemplo n.º 9
0
 /// <summary>从当前 <see cref="T:System.Security.AccessControl.DiscretionaryAcl" /> 对象移除指定的审核规则。在指定对象类型或继承的对象类型时,为目录对象的访问控制列表 (ACL) 使用此方法。</summary>
 /// <param name="auditFlags">要移除的审核规则的类型。</param>
 /// <param name="sid">要为其移除审核规则的 <see cref="T:System.Security.Principal.SecurityIdentifier" />。</param>
 /// <param name="accessMask">要移除的规则的访问掩码。</param>
 /// <param name="inheritanceFlags">指定要移除的规则的继承属性的标志。</param>
 /// <param name="propagationFlags">指定要移除的规则的继承传播属性的标志。</param>
 /// <param name="objectFlags">指定 <paramref name="objectType" /> 和 <paramref name="inheritedObjectType" /> 参数是否包含非 null 值的标志。</param>
 /// <param name="objectType">移除的审核控制规则所应用到的对象的类标识。</param>
 /// <param name="inheritedObjectType">可以继承移除的审核规则的子对象的类标识。</param>
 public void RemoveAuditSpecific(AuditFlags auditFlags, SecurityIdentifier sid, int accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
 {
     if (!this.IsDS)
     {
         throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_OnlyValidForDS"));
     }
     this.RemoveQualifiedAcesSpecific(sid, AceQualifier.SystemAudit, accessMask, GenericAce.AceFlagsFromAuditFlags(auditFlags) | GenericAce.AceFlagsFromInheritanceFlags(inheritanceFlags, propagationFlags), objectFlags, objectType, inheritedObjectType);
 }