MutexSecurity.RemoveAuditRule(MutexAuditRule) Método

Definição

Pesquisa uma regra de controle de auditoria com o mesmo usuário que a regra especificada e com sinalizadores de herança e de propagação compatíveis; se uma regra compatível for encontrada, os direitos contidos na regra especificada serão removidos dela.Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it.

public:
 bool RemoveAuditRule(System::Security::AccessControl::MutexAuditRule ^ rule);
public bool RemoveAuditRule (System.Security.AccessControl.MutexAuditRule rule);
override this.RemoveAuditRule : System.Security.AccessControl.MutexAuditRule -> bool
Public Function RemoveAuditRule (rule As MutexAuditRule) As Boolean

Parâmetros

rule
MutexAuditRule

Um MutexAuditRule que especifica o usuário pelo qual pesquisar, bem como um conjunto de sinalizadores de herança e de propagação com os quais uma regra correspondente, se encontrada, deve ser compatível.A MutexAuditRule that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Especifica os direitos a serem removidos da regra compatível, se encontrado.Specifies the rights to remove from the compatible rule, if found.

Retornos

Boolean

true se uma regra compatível for encontrada; caso contrário, false.true if a compatible rule is found; otherwise, false.

Exceções

rule é null.rule is null.

Comentários

O atual MutexSecurity é procurado por uma regra de auditoria que tenha o mesmo usuário que o rule .The current MutexSecurity is searched for an audit rule that has the same user as rule. Se nenhuma regra desse tipo for encontrada, nenhuma ação será executada e o método retornará false .If no such rule is found, no action is taken, and the method returns false. Se forem encontradas regras de correspondência, seus sinalizadores de herança e compatibilidade serão verificados quanto à compatibilidade com os sinalizadores especificados em rule .If matching rules are found, their inheritance and compatibility flags are checked for compatibility with the flags specified in rule. Se nenhuma regra compatível for encontrada, nenhuma ação será executada e o método retornará false .If no compatible rule is found, no action is taken, and the method returns false. Se uma regra com sinalizadores compatíveis for encontrada, os direitos especificados em rule serão removidos da regra compatível e o método retornará true .If a rule with compatible flags is found, the rights specified in rule are removed from the compatible rule, and the method returns true. Se o rule especificar direitos não contidos na regra compatível, nenhuma ação será executada em relação a esses direitos.If rule specifies rights not contained in the compatible rule, no action is taken with respect to those rights. Se todos os direitos forem removidos da regra compatível, toda a regra será removida do MutexSecurity objeto atual.If all rights are removed from the compatible rule, the entire rule is removed from the current MutexSecurity object.

Importante

Embora você possa especificar sinalizadores de herança e de propagação para regras de auditoria de mutex, criando-os com o AccessRuleFactory método, isso não é recomendado.Although you can specify inheritance and propagation flags for mutex audit rules, by creating them with the AccessRuleFactory method, this is not recommended. A herança e a propagação não têm significado para mutexes nomeados e tornam a manutenção das regras de auditoria mais complicadas.Inheritance and propagation have no meaning for named mutexes, and they make the maintenance of audit rules more complicated.

Aplica-se a