ObjectSecurity.ModifyAccessRule(AccessControlModification, AccessRule, Boolean) 方法

定义

将指定的修改应用到与此 ObjectSecurity 对象关联的自由访问控制列表 (DACL) 中。Applies the specified modification to the Discretionary Access Control List (DACL) associated with this ObjectSecurity object.

public:
 virtual bool ModifyAccessRule(System::Security::AccessControl::AccessControlModification modification, System::Security::AccessControl::AccessRule ^ rule, [Runtime::InteropServices::Out] bool % modified);
public virtual bool ModifyAccessRule (System.Security.AccessControl.AccessControlModification modification, System.Security.AccessControl.AccessRule rule, out bool modified);
abstract member ModifyAccessRule : System.Security.AccessControl.AccessControlModification * System.Security.AccessControl.AccessRule * bool -> bool
override this.ModifyAccessRule : System.Security.AccessControl.AccessControlModification * System.Security.AccessControl.AccessRule * bool -> bool
Public Overridable Function ModifyAccessRule (modification As AccessControlModification, rule As AccessRule, ByRef modified As Boolean) As Boolean

参数

modification
AccessControlModification

要应用于 DACL 的修改。The modification to apply to the DACL.

rule
AccessRule

要修改的访问规则。The access rule to modify.

modified
Boolean

如果已成功修改 DACL,则为 true;否则为 falsetrue if the DACL is successfully modified; otherwise, false.

返回

如果已成功修改 DACL,则为 true;否则为 falsetrue if the DACL is successfully modified; otherwise, false.

注解

为了避免意外允许访问主体,应用程序应检查是否存在允许每个人完全访问权限(AEFA)访问控制项(ACE),并在修改 DACL 之前将其删除。To avoid unintentionally allowing access to principals, applications should check for the existence of an allow everyone full access (AEFA) access control entry (ACE) and remove it before modifying a DACL.

适用于