PipeSecurity.RemoveAuditRule(PipeAuditRule) 方法

定义

将审核规则从与当前 PipeSecurity 对象关联的系统访问控制列表 (SACL) 中移除。Removes an audit rule from the System Access Control List (SACL) that is associated with the current PipeSecurity object.

public:
 bool RemoveAuditRule(System::IO::Pipes::PipeAuditRule ^ rule);
public bool RemoveAuditRule (System.IO.Pipes.PipeAuditRule rule);
override this.RemoveAuditRule : System.IO.Pipes.PipeAuditRule -> bool
Public Function RemoveAuditRule (rule As PipeAuditRule) As Boolean

参数

rule
PipeAuditRule

要移除的审核规则。The audit rule to remove.

返回

如果审核规则已移除,则为 true;否则为 falsetrue if the audit rule was removed; otherwise, false

异常

rule 参数为 nullThe rule parameter is null.

注解

方法从Allow当前Deny 对象PipeSecurity中移除所有匹配的审核规则或所有匹配的审核规则。 RemoveAuditRuleThe RemoveAuditRule method removes either all matching Deny audit rules or all matching Allow audit rules from the current PipeSecurity object. 例如, 你可以使用此方法Deny通过传递Failure使用Deny值、值和用户帐户创建的FileSystemAuditRule对象来删除用户的所有审核规则。For example, you can use this method to remove all Deny audit rules for a user by passing a FileSystemAuditRule object created using the Deny value, the Failure value, and a user account. 如果执行此操作, 方法RemoveAuditRule将删除任何Failure指定值或Success值的拒绝规则。When you do this, the RemoveAuditRule method removes any deny rules that specify the Failure value or the Success value.

适用于