FileSecurity FileSecurity FileSecurity FileSecurity Class

Definição

Representa o controle de acesso e a auditoria de segurança para um arquivo.Represents the access control and audit security for a file. Essa classe não pode ser herdada.This class cannot be inherited.

public ref class FileSecurity sealed : System::Security::AccessControl::FileSystemSecurity
[System.Security.SecurityCritical]
public sealed class FileSecurity : System.Security.AccessControl.FileSystemSecurity
type FileSecurity = class
    inherit FileSystemSecurity
Public NotInheritable Class FileSecurity
Inherits FileSystemSecurity
Herança
Atributos

Exemplos

O exemplo de código a seguir FileSecurity usa a classe para adicionar e, em seguida, remover uma entrada de lista de controle de acesso (ACL) de um arquivo.The following code example uses the FileSecurity class to add and then remove an access control list (ACL) entry from a file. Você deve fornecer uma conta de grupo ou de usuário válida para executar este exemplo.You must supply a valid user or group account to run this example.

using namespace System;
using namespace System::IO;
using namespace System::Security::AccessControl;

// Adds an ACL entry on the specified file for the specified account.

void AddFileSecurity(String^ fileName, String^ account, 
                        FileSystemRights rights, AccessControlType controlType)
{
    // Get a FileSecurity object that represents the 
    // current security settings.
    FileSecurity^ fSecurity = File::GetAccessControl(fileName);

    // Add the FileSystemAccessRule to the security settings. 
    fSecurity->AddAccessRule(gcnew FileSystemAccessRule
                                   (account,rights, controlType));

    // Set the new access settings.
    File::SetAccessControl(fileName, fSecurity);
}

// Removes an ACL entry on the specified file for the specified account.

void RemoveFileSecurity(String^ fileName, String^ account, 
                        FileSystemRights rights, AccessControlType controlType)
{

    // Get a FileSecurity object that represents the 
    // current security settings.
    FileSecurity^ fSecurity = File::GetAccessControl(fileName);

    // Remove the FileSystemAccessRule from the security settings. 
    fSecurity->RemoveAccessRule(gcnew FileSystemAccessRule
                                      (account,rights, controlType));

    // Set the new access settings.
    File::SetAccessControl(fileName, fSecurity);
}

int main()
{
    try
    {
        String^ fileName = "test.xml";

        Console::WriteLine("Adding access control entry for " + fileName);

        // Add the access control entry to the file.
        AddFileSecurity(fileName, "MYDOMAIN\\MyAccount", 
            FileSystemRights::ReadData, AccessControlType::Allow);

        Console::WriteLine("Removing access control entry from " + fileName);

        // Remove the access control entry from the file.
        RemoveFileSecurity(fileName, "MYDOMAIN\\MyAccount", 
            FileSystemRights::ReadData, AccessControlType::Allow);

        Console::WriteLine("Done.");
    }
    catch (Exception^ ex)
    {
        Console::WriteLine(ex->Message);
    }
}

using System;
using System.IO;
using System.Security.AccessControl;

namespace FileSystemExample
{
    class FileExample
    {
        public static void Main()
        {
            try
            {
                string fileName = "test.xml";

                Console.WriteLine("Adding access control entry for "
                    + fileName);

                // Add the access control entry to the file.
                AddFileSecurity(fileName, @"DomainName\AccountName",
                    FileSystemRights.ReadData, AccessControlType.Allow);

                Console.WriteLine("Removing access control entry from "
                    + fileName);

                // Remove the access control entry from the file.
                RemoveFileSecurity(fileName, @"DomainName\AccountName",
                    FileSystemRights.ReadData, AccessControlType.Allow);

                Console.WriteLine("Done.");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }

        // Adds an ACL entry on the specified file for the specified account.
        public static void AddFileSecurity(string fileName, string account,
            FileSystemRights rights, AccessControlType controlType)
        {


            // Get a FileSecurity object that represents the
            // current security settings.
            FileSecurity fSecurity = File.GetAccessControl(fileName);

            // Add the FileSystemAccessRule to the security settings.
            fSecurity.AddAccessRule(new FileSystemAccessRule(account,
                rights, controlType));

            // Set the new access settings.
            File.SetAccessControl(fileName, fSecurity);

        }

        // Removes an ACL entry on the specified file for the specified account.
        public static void RemoveFileSecurity(string fileName, string account,
            FileSystemRights rights, AccessControlType controlType)
        {

            // Get a FileSecurity object that represents the
            // current security settings.
            FileSecurity fSecurity = File.GetAccessControl(fileName);

            // Remove the FileSystemAccessRule from the security settings.
            fSecurity.RemoveAccessRule(new FileSystemAccessRule(account,
                rights, controlType));

            // Set the new access settings.
            File.SetAccessControl(fileName, fSecurity);

        }
    }
}
Imports System.IO
Imports System.Security.AccessControl



Module FileExample

    Sub Main()
        Try
            Dim fileName As String = "test.xml"

            Console.WriteLine("Adding access control entry for " & fileName)

            ' Add the access control entry to the file.
            AddFileSecurity(fileName, "DomainName\AccountName", _
                FileSystemRights.ReadData, AccessControlType.Allow)

            Console.WriteLine("Removing access control entry from " & fileName)

            ' Remove the access control entry from the file.
            RemoveFileSecurity(fileName, "DomainName\AccountName", _
                FileSystemRights.ReadData, AccessControlType.Allow)

            Console.WriteLine("Done.")
        Catch e As Exception
            Console.WriteLine(e)
        End Try

    End Sub


    ' Adds an ACL entry on the specified file for the specified account.
    Sub AddFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)
  
        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Add the FileSystemAccessRule to the security settings. 
        Dim accessRule As FileSystemAccessRule = _
            New FileSystemAccessRule(account, rights, controlType)

        fSecurity.AddAccessRule(accessRule)

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub


    ' Removes an ACL entry on the specified file for the specified account.
    Sub RemoveFileSecurity(ByVal fileName As String, ByVal account As String, _
        ByVal rights As FileSystemRights, ByVal controlType As AccessControlType)

        ' Get a FileSecurity object that represents the 
        ' current security settings.
        Dim fSecurity As FileSecurity = File.GetAccessControl(fileName)

        ' Remove the FileSystemAccessRule from the security settings. 
        fSecurity.RemoveAccessRule(New FileSystemAccessRule(account, _
            rights, controlType))

        ' Set the new access settings.
        File.SetAccessControl(fileName, fSecurity)

    End Sub
End Module

Comentários

A FileSecurity classe especifica os direitos de acesso para um arquivo do sistema e como as tentativas de acesso são auditadas.The FileSecurity class specifies the access rights for a system file and how access attempts are audited. Essa classe representa direitos de acesso e auditoria como um conjunto de regras.This class represents access and audit rights as a set of rules. Cada regra de acesso é representada por FileSystemAccessRule um objeto, enquanto cada regra de auditoria é representada FileSystemAuditRule por um objeto.Each access rule is represented by a FileSystemAccessRule object, while each audit rule is represented by a FileSystemAuditRule object.

A FileSecurity classe é uma abstração do sistema de segurança de arquivos subjacente do Microsoft Windows.The FileSecurity class is an abstraction of the underlying Microsoft Windows file security system. Nesse sistema, cada arquivo tem uma DACL (lista de controle de acesso discricionário), que controla o acesso ao arquivo e uma SACL (lista de controle de acesso) do sistema, que especifica as tentativas de controle de acesso que são auditadas.In this system, each file has a discretionary access control list (DACL), which controls access to the file, and a system access control list (SACL), which specifies the access control attempts that are audited. As FileSystemAccessRule classes FileSystemAuditRule e são abstrações das ACEs (entradas de controle de acesso) que compõem DACLs e SACLs.The FileSystemAccessRule and FileSystemAuditRule classes are abstractions of the access control entries (ACEs) that comprise DACLs and SACLs.

A FileSecurity classe oculta muitos dos detalhes de DACLs e SACLs; você não precisa se preocupar com a ordenação Ace ou DACLs nulas.The FileSecurity class hides many of the details of DACLs and SACLs; you do not have to worry about ACE ordering or null DACLS.

Use a FileSecurity classe para recuperar, adicionar ou alterar as regras de acesso que representam a DACL e a SACL de um arquivo.Use the FileSecurity class to retrieve, add, or change the access rules that represent the DACL and SACL of a file.

Para manter as regras de acesso ou de auditoria novas ou alteradas para um SetAccessControl arquivo, use o método.To persist new or changed access or audit rules to a file, use the SetAccessControl method. Para recuperar as regras de acesso ou de auditoria de um arquivo existente, use o método GetAccessControl.To retrieve access or audit rules from an existing file, use the GetAccessControl method.

Construtores

FileSecurity() FileSecurity() FileSecurity() FileSecurity()

Inicializa uma nova instância da classe FileSecurity.Initializes a new instance of the FileSecurity class.

FileSecurity(String, AccessControlSections) FileSecurity(String, AccessControlSections) FileSecurity(String, AccessControlSections) FileSecurity(String, AccessControlSections)

Inicializa uma nova instância da classe FileSecurity de um arquivo especificado usando os valores especificados da enumeração AccessControlSections.Initializes a new instance of the FileSecurity class from a specified file using the specified values of the AccessControlSections enumeration.

Métodos

AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType) AccessRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AccessControlType)

Inicializa uma nova instância da classe FileSystemAccessRule que representa uma nova regra de controle de acesso para o usuário especificado, com os direitos de acesso, o controle de acesso e os sinalizadores especificados.Initializes a new instance of the FileSystemAccessRule class that represents a new access control rule for the specified user, with the specified access rights, access control, and flags.

(Inherited from FileSystemSecurity)
AddAccessRule(AccessRule) AddAccessRule(AccessRule) AddAccessRule(AccessRule) AddAccessRule(AccessRule)

Aplica a regra de acesso especificada à DACL (Lista de Controle de Acesso Discricionário) associada a esse objeto CommonObjectSecurity.Adds the specified access rule to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
AddAccessRule(FileSystemAccessRule) AddAccessRule(FileSystemAccessRule) AddAccessRule(FileSystemAccessRule) AddAccessRule(FileSystemAccessRule)

Adiciona a permissão de lista de controle de acesso (ACL) especificada ao arquivo ou diretório atual.Adds the specified access control list (ACL) permission to the current file or directory.

(Inherited from FileSystemSecurity)
AddAuditRule(AuditRule) AddAuditRule(AuditRule) AddAuditRule(AuditRule) AddAuditRule(AuditRule)

Adiciona a regra de auditoria especificada à SACL (Lista de Controle de Acesso do Sistema) associada ao objeto CommonObjectSecurity atual.Adds the specified audit rule to the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
AddAuditRule(FileSystemAuditRule) AddAuditRule(FileSystemAuditRule) AddAuditRule(FileSystemAuditRule) AddAuditRule(FileSystemAuditRule)

Adiciona a regra de auditoria especificada ao diretório ou arquivo atual.Adds the specified audit rule to the current file or directory.

(Inherited from FileSystemSecurity)
AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags) AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags)

Inicializa uma nova instância da classe FileSystemAuditRule que representa a regra de auditoria para o usuário especificado.Initializes a new instance of the FileSystemAuditRule class representing the specified audit rule for the specified user.

(Inherited from FileSystemSecurity)
Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetAccessRules(Boolean, Boolean, Type) GetAccessRules(Boolean, Boolean, Type) GetAccessRules(Boolean, Boolean, Type) GetAccessRules(Boolean, Boolean, Type)

Obtém uma coleção das regras de acesso associadas ao identificador de segurança especificado.Gets a collection of the access rules associated with the specified security identifier.

(Inherited from CommonObjectSecurity)
GetAuditRules(Boolean, Boolean, Type) GetAuditRules(Boolean, Boolean, Type) GetAuditRules(Boolean, Boolean, Type) GetAuditRules(Boolean, Boolean, Type)

Obtém uma coleção das regras de auditoria associadas ao identificador de segurança especificado.Gets a collection of the audit rules associated with the specified security identifier.

(Inherited from CommonObjectSecurity)
GetGroup(Type) GetGroup(Type) GetGroup(Type) GetGroup(Type)

Obtém o grupo primário associado ao proprietário especificado.Gets the primary group associated with the specified owner.

(Inherited from ObjectSecurity)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serve como a função de hash padrão.Serves as the default hash function.

(Inherited from Object)
GetOwner(Type) GetOwner(Type) GetOwner(Type) GetOwner(Type)

Obtém o proprietário associado ao grupo primário especificado.Gets the owner associated with the specified primary group.

(Inherited from ObjectSecurity)
GetSecurityDescriptorBinaryForm() GetSecurityDescriptorBinaryForm() GetSecurityDescriptorBinaryForm() GetSecurityDescriptorBinaryForm()

Retorna uma matriz de valores de byte que representa as informações do descritor de segurança para este objeto ObjectSecurity.Returns an array of byte values that represents the security descriptor information for this ObjectSecurity object.

(Inherited from ObjectSecurity)
GetSecurityDescriptorSddlForm(AccessControlSections) GetSecurityDescriptorSddlForm(AccessControlSections) GetSecurityDescriptorSddlForm(AccessControlSections) GetSecurityDescriptorSddlForm(AccessControlSections)

Retorna a representação em SDDL (Linguagem de Definição do Descritor de Segurança) das seções especificadas do descritor de segurança associado a este objeto ObjectSecurity.Returns the Security Descriptor Definition Language (SDDL) representation of the specified sections of the security descriptor associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
GetType() GetType() GetType() GetType()

Obtém o Type da instância atual.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object.

(Inherited from Object)
ModifyAccess(AccessControlModification, AccessRule, Boolean) ModifyAccess(AccessControlModification, AccessRule, Boolean) ModifyAccess(AccessControlModification, AccessRule, Boolean) ModifyAccess(AccessControlModification, AccessRule, Boolean)

Aplica a modificação especificada à DACL (Lista de controle de acesso discricionário) associada a esse objeto CommonObjectSecurity.Applies the specified modification to the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
ModifyAccessRule(AccessControlModification, AccessRule, Boolean) ModifyAccessRule(AccessControlModification, AccessRule, Boolean) ModifyAccessRule(AccessControlModification, AccessRule, Boolean) ModifyAccessRule(AccessControlModification, AccessRule, Boolean)

Aplica a modificação especificada à DACL (Lista de controle de acesso discricionário) associada a esse objeto ObjectSecurity.Applies the specified modification to the Discretionary Access Control List (DACL) associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
ModifyAudit(AccessControlModification, AuditRule, Boolean) ModifyAudit(AccessControlModification, AuditRule, Boolean) ModifyAudit(AccessControlModification, AuditRule, Boolean) ModifyAudit(AccessControlModification, AuditRule, Boolean)

Aplica a modificação especificada à SACL (Lista de Controle de Acesso do Sistema) associada a este objeto CommonObjectSecurity.Applies the specified modification to the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
ModifyAuditRule(AccessControlModification, AuditRule, Boolean) ModifyAuditRule(AccessControlModification, AuditRule, Boolean) ModifyAuditRule(AccessControlModification, AuditRule, Boolean) ModifyAuditRule(AccessControlModification, AuditRule, Boolean)

Aplica a modificação especificada à SACL (Lista de Controle de Acesso do Sistema) associada a este objeto ObjectSecurity.Applies the specified modification to the System Access Control List (SACL) associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections) Persist(Boolean, String, AccessControlSections)

Salva as seções especificadas do descritor de segurança associado a este objeto ObjectSecurity no armazenamento permanente.Saves the specified sections of the security descriptor associated with this ObjectSecurity object to permanent storage. É recomendável que os valores dos parâmetros includeSections passados para o construtor e os métodos persist sejam idênticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from ObjectSecurity)
Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections) Persist(SafeHandle, AccessControlSections)

Salva as seções especificadas do descritor de segurança associado a este objeto NativeObjectSecurity no armazenamento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. É recomendável que os valores dos parâmetros includeSections passados para o construtor e os métodos persist sejam idênticos.We recommend.persist that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object) Persist(SafeHandle, AccessControlSections, Object)

Salva as seções especificadas do descritor de segurança associado a este objeto NativeObjectSecurity no armazenamento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. É recomendável que os valores dos parâmetros includeSections passados para o construtor e os métodos persist sejam idênticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections) Persist(String, AccessControlSections)

Salva as seções especificadas do descritor de segurança associado a este objeto NativeObjectSecurity no armazenamento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. É recomendável que os valores dos parâmetros includeSections passados para o construtor e os métodos persist sejam idênticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object) Persist(String, AccessControlSections, Object)

Salva as seções especificadas do descritor de segurança associado a este objeto NativeObjectSecurity no armazenamento permanente.Saves the specified sections of the security descriptor associated with this NativeObjectSecurity object to permanent storage. É recomendável que os valores dos parâmetros includeSections passados para o construtor e os métodos persist sejam idênticos.We recommend that the values of the includeSections parameters passed to the constructor and persist methods be identical.

(Inherited from NativeObjectSecurity)
PurgeAccessRules(IdentityReference) PurgeAccessRules(IdentityReference) PurgeAccessRules(IdentityReference) PurgeAccessRules(IdentityReference)

Remove todas as regras de acesso associadas à IdentityReference especificada.Removes all access rules associated with the specified IdentityReference.

(Inherited from ObjectSecurity)
PurgeAuditRules(IdentityReference) PurgeAuditRules(IdentityReference) PurgeAuditRules(IdentityReference) PurgeAuditRules(IdentityReference)

Remove todas as regras de auditoria associadas ao IdentityReference especificado.Removes all audit rules associated with the specified IdentityReference.

(Inherited from ObjectSecurity)
ReadLock() ReadLock() ReadLock() ReadLock()

Bloqueia este objeto ObjectSecurity para acesso de leitura.Locks this ObjectSecurity object for read access.

(Inherited from ObjectSecurity)
ReadUnlock() ReadUnlock() ReadUnlock() ReadUnlock()

Desbloqueia este objeto ObjectSecurity para acesso de leitura.Unlocks this ObjectSecurity object for read access.

(Inherited from ObjectSecurity)
RemoveAccessRule(AccessRule) RemoveAccessRule(AccessRule) RemoveAccessRule(AccessRule) RemoveAccessRule(AccessRule)

Remove as regras de acesso que contêm a mesma máscara de acesso e o identificador de segurança, como a regra de acesso especificada da DACL (lista de controle de acesso discricionário) associada a esse objeto CommonObjectSecurity.Removes access rules that contain the same security identifier and access mask as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAccessRule(FileSystemAccessRule) RemoveAccessRule(FileSystemAccessRule) RemoveAccessRule(FileSystemAccessRule) RemoveAccessRule(FileSystemAccessRule)

Remove do diretório ou arquivo atual todas as permissões de negar ou permitir da ACL (lista de controle de acesso) que forem correspondentes.Removes all matching allow or deny access control list (ACL) permissions from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAccessRuleAll(AccessRule) RemoveAccessRuleAll(AccessRule) RemoveAccessRuleAll(AccessRule) RemoveAccessRuleAll(AccessRule)

Remove todas as regras de acesso que correspondem ao mesmo identificador de segurança que a regra de acesso especificada da DACL (Lista de Controle de Acesso Discricionário) associada a este objeto CommonObjectSecurity.Removes all access rules that have the same security identifier as the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAccessRuleAll(FileSystemAccessRule) RemoveAccessRuleAll(FileSystemAccessRule) RemoveAccessRuleAll(FileSystemAccessRule) RemoveAccessRuleAll(FileSystemAccessRule)

Remove todas as permissões da ACL (lista de controle de acesso) para o usuário especificado do diretório ou arquivo atual.Removes all access control list (ACL) permissions for the specified user from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAccessRuleSpecific(AccessRule) RemoveAccessRuleSpecific(AccessRule) RemoveAccessRuleSpecific(AccessRule) RemoveAccessRuleSpecific(AccessRule)

Remove todas as regras de acesso que correspondem com exatidão à regra de acesso especificada da DACL (Lista de Controle de Acesso Discricionário) associada a este objeto CommonObjectSecurity.Removes all access rules that exactly match the specified access rule from the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAccessRuleSpecific(FileSystemAccessRule) RemoveAccessRuleSpecific(FileSystemAccessRule) RemoveAccessRuleSpecific(FileSystemAccessRule) RemoveAccessRuleSpecific(FileSystemAccessRule)

Remove do diretório ou arquivo atual uma única permissão de negar ou permitir correspondente da ACL (lista de controle de acesso).Removes a single matching allow or deny access control list (ACL) permission from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAuditRule(AuditRule) RemoveAuditRule(AuditRule) RemoveAuditRule(AuditRule) RemoveAuditRule(AuditRule)

Remove todas as regras de auditoria que contêm o mesmo identificador de segurança e máscara de acesso que a regra de auditoria especificada na SACL (Lista de Controle de Acesso do Sistema) associada a este objeto CommonObjectSecurity.Removes audit rules that contain the same security identifier and access mask as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAuditRule(FileSystemAuditRule) RemoveAuditRule(FileSystemAuditRule) RemoveAuditRule(FileSystemAuditRule) RemoveAuditRule(FileSystemAuditRule)

Remove do diretório ou arquivo atual todas as regras de auditoria correspondentes.Removes all matching allow or deny audit rules from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAuditRuleAll(AuditRule) RemoveAuditRuleAll(AuditRule) RemoveAuditRuleAll(AuditRule) RemoveAuditRuleAll(AuditRule)

Remove todas as regras de auditoria que têm o mesmo identificador de segurança que a regra de auditoria especificada da SACL (Lista de Controle de Acesso do Sistema) associada a este objeto CommonObjectSecurity.Removes all audit rules that have the same security identifier as the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAuditRuleAll(FileSystemAuditRule) RemoveAuditRuleAll(FileSystemAuditRule) RemoveAuditRuleAll(FileSystemAuditRule) RemoveAuditRuleAll(FileSystemAuditRule)

Remove todas as permissões das regras de auditoria para o usuário especificado do diretório ou arquivo atual.Removes all audit rules for the specified user from the current file or directory.

(Inherited from FileSystemSecurity)
RemoveAuditRuleSpecific(AuditRule) RemoveAuditRuleSpecific(AuditRule) RemoveAuditRuleSpecific(AuditRule) RemoveAuditRuleSpecific(AuditRule)

Remove todas as regras de auditoria que correspondem com exatidão à regra de auditoria especificada na SACL (Lista de Controle de Acesso do Sistema) associada a este objeto CommonObjectSecurity.Removes all audit rules that exactly match the specified audit rule from the System Access Control List (SACL) associated with this CommonObjectSecurity object.

(Inherited from CommonObjectSecurity)
RemoveAuditRuleSpecific(FileSystemAuditRule) RemoveAuditRuleSpecific(FileSystemAuditRule) RemoveAuditRuleSpecific(FileSystemAuditRule) RemoveAuditRuleSpecific(FileSystemAuditRule)

Remove do diretório ou arquivo atual uma única regra de auditoria correspondente.Removes a single matching allow or deny audit rule from the current file or directory.

(Inherited from FileSystemSecurity)
ResetAccessRule(AccessRule) ResetAccessRule(AccessRule) ResetAccessRule(AccessRule) ResetAccessRule(AccessRule)

Remove todas as regras de acesso na DACL (Lista de Controle de Acesso Discricionário) associada a este objeto CommonObjectSecurity e, em seguida, adiciona a regra de acesso especificada.Removes all access rules in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule.

(Inherited from CommonObjectSecurity)
ResetAccessRule(FileSystemAccessRule) ResetAccessRule(FileSystemAccessRule) ResetAccessRule(FileSystemAccessRule) ResetAccessRule(FileSystemAccessRule)

Adiciona a permissão de lista de controle de acesso (ACL) especificada ao arquivo ou diretório atual e remove todas as permissões de ACL correspondentes.Adds the specified access control list (ACL) permission to the current file or directory and removes all matching ACL permissions.

(Inherited from FileSystemSecurity)
SetAccessRule(AccessRule) SetAccessRule(AccessRule) SetAccessRule(AccessRule) SetAccessRule(AccessRule)

Remove todas as regras de acesso que contêm o mesmo identificador de segurança e qualificador que a regra de acesso especificada na DACL (Lista de Controle de Acesso Discricionário) associada a esse objeto CommonObjectSecurity e, em seguida, adiciona a regra de acesso indicada.Removes all access rules that contain the same security identifier and qualifier as the specified access rule in the Discretionary Access Control List (DACL) associated with this CommonObjectSecurity object and then adds the specified access rule.

(Inherited from CommonObjectSecurity)
SetAccessRule(FileSystemAccessRule) SetAccessRule(FileSystemAccessRule) SetAccessRule(FileSystemAccessRule) SetAccessRule(FileSystemAccessRule)

Define a permissão da ACL (lista de controle de acesso) especificada para o diretório ou o arquivo atual.Sets the specified access control list (ACL) permission for the current file or directory.

(Inherited from FileSystemSecurity)
SetAccessRuleProtection(Boolean, Boolean) SetAccessRuleProtection(Boolean, Boolean) SetAccessRuleProtection(Boolean, Boolean) SetAccessRuleProtection(Boolean, Boolean)

Define ou remove a proteção das regras de acesso associada a este objeto ObjectSecurity.Sets or removes protection of the access rules associated with this ObjectSecurity object. As regras de acesso protegidas não podem ser modificadas por objetos pai por meio da herança.Protected access rules cannot be modified by parent objects through inheritance.

(Inherited from ObjectSecurity)
SetAuditRule(AuditRule) SetAuditRule(AuditRule) SetAuditRule(AuditRule) SetAuditRule(AuditRule)

Remove todas as regras de auditoria que contêm o mesmo identificador de segurança e qualificador que a regra de auditoria especificada na SACL (Lista de Controle de Acesso do Sistema) associada a este objeto CommonObjectSecurity e, em seguida, adiciona a regra de auditoria indicada.Removes all audit rules that contain the same security identifier and qualifier as the specified audit rule in the System Access Control List (SACL) associated with this CommonObjectSecurity object and then adds the specified audit rule.

(Inherited from CommonObjectSecurity)
SetAuditRule(FileSystemAuditRule) SetAuditRule(FileSystemAuditRule) SetAuditRule(FileSystemAuditRule) SetAuditRule(FileSystemAuditRule)

Define a regra de auditoria especificada para o diretório ou arquivo atual.Sets the specified audit rule for the current file or directory.

(Inherited from FileSystemSecurity)
SetAuditRuleProtection(Boolean, Boolean) SetAuditRuleProtection(Boolean, Boolean) SetAuditRuleProtection(Boolean, Boolean) SetAuditRuleProtection(Boolean, Boolean)

Define ou remove a proteção das regras de auditoria associadas a este objeto ObjectSecurity.Sets or removes protection of the audit rules associated with this ObjectSecurity object. As regras de auditoria protegidas não podem ser modificadas por objetos pai por meio da herança.Protected audit rules cannot be modified by parent objects through inheritance.

(Inherited from ObjectSecurity)
SetGroup(IdentityReference) SetGroup(IdentityReference) SetGroup(IdentityReference) SetGroup(IdentityReference)

Define o grupo primário para o descritor de segurança associado a esse objeto ObjectSecurity.Sets the primary group for the security descriptor associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
SetOwner(IdentityReference) SetOwner(IdentityReference) SetOwner(IdentityReference) SetOwner(IdentityReference)

Define o proprietário para o descritor de segurança associado a esse objeto ObjectSecurity.Sets the owner for the security descriptor associated with this ObjectSecurity object.

(Inherited from ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[]) SetSecurityDescriptorBinaryForm(Byte[]) SetSecurityDescriptorBinaryForm(Byte[]) SetSecurityDescriptorBinaryForm(Byte[])

Define o descritor de segurança para este objeto ObjectSecurity da matriz especificada de valores de byte.Sets the security descriptor for this ObjectSecurity object from the specified array of byte values.

(Inherited from ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections) SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections) SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections) SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

Define as seções especificadas do descritor de segurança para este objeto ObjectSecurity da matriz especificada de valores de byte.Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified array of byte values.

(Inherited from ObjectSecurity)
SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String)

Define o descritor de segurança para este objeto ObjectSecurity da cadeia de caracteres SDDL (Linguagem de Definição do Descritor de Segurança) especificada.Sets the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

(Inherited from ObjectSecurity)
SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections)

Define as seções especificadas do descritor de segurança para este objeto ObjectSecurity da cadeia de caracteres SDDL (Linguagem de Definição do Descritor de Segurança) especificada.Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

(Inherited from ObjectSecurity)
ToString() ToString() ToString() ToString()

Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object.

(Inherited from Object)
WriteLock() WriteLock() WriteLock() WriteLock()

Bloqueia este objeto ObjectSecurity para acesso de gravação.Locks this ObjectSecurity object for write access.

(Inherited from ObjectSecurity)
WriteUnlock() WriteUnlock() WriteUnlock() WriteUnlock()

Desbloqueia este objeto ObjectSecurity para acesso de gravação.Unlocks this ObjectSecurity object for write access.

(Inherited from ObjectSecurity)

Propriedades

AccessRightType AccessRightType AccessRightType AccessRightType

Obtém a enumeração que a classe FileSystemSecurity usa para representar os direitos de acesso.Gets the enumeration that the FileSystemSecurity class uses to represent access rights.

(Inherited from FileSystemSecurity)
AccessRulesModified AccessRulesModified AccessRulesModified AccessRulesModified

Obtém ou define um valor booliano que especifica se as regras de acesso associadas a este objeto ObjectSecurity foram modificadas.Gets or sets a Boolean value that specifies whether the access rules associated with this ObjectSecurity object have been modified.

(Inherited from ObjectSecurity)
AccessRuleType AccessRuleType AccessRuleType AccessRuleType

Obtém a enumeração que a classe FileSystemSecurity usa para representar as regras de acesso.Gets the enumeration that the FileSystemSecurity class uses to represent access rules.

(Inherited from FileSystemSecurity)
AreAccessRulesCanonical AreAccessRulesCanonical AreAccessRulesCanonical AreAccessRulesCanonical

Obtém um valor booliano que especifica se as regras de acesso associadas a este objeto ObjectSecurity estão na ordem canônica.Gets a Boolean value that specifies whether the access rules associated with this ObjectSecurity object are in canonical order.

(Inherited from ObjectSecurity)
AreAccessRulesProtected AreAccessRulesProtected AreAccessRulesProtected AreAccessRulesProtected

Obtém um valor booliano que especifica se a DACL (Lista de Controle de Acesso Discricionário) associada a esse objeto ObjectSecurity está protegida.Gets a Boolean value that specifies whether the Discretionary Access Control List (DACL) associated with this ObjectSecurity object is protected.

(Inherited from ObjectSecurity)
AreAuditRulesCanonical AreAuditRulesCanonical AreAuditRulesCanonical AreAuditRulesCanonical

Obtém um valor booliano que especifica se as regras de auditoria associadas a este objeto ObjectSecurity estão na ordem canônica.Gets a Boolean value that specifies whether the audit rules associated with this ObjectSecurity object are in canonical order.

(Inherited from ObjectSecurity)
AreAuditRulesProtected AreAuditRulesProtected AreAuditRulesProtected AreAuditRulesProtected

Obtém um valor booliano que especifica se a SACL (Lista de Controle de Acesso do Sistema) associada a esse objeto ObjectSecurity está protegida.Gets a Boolean value that specifies whether the System Access Control List (SACL) associated with this ObjectSecurity object is protected.

(Inherited from ObjectSecurity)
AuditRulesModified AuditRulesModified AuditRulesModified AuditRulesModified

Obtém ou define um valor booliano que especifica se as regras de auditoria associadas a este objeto ObjectSecurity foram modificadas.Gets or sets a Boolean value that specifies whether the audit rules associated with this ObjectSecurity object have been modified.

(Inherited from ObjectSecurity)
AuditRuleType AuditRuleType AuditRuleType AuditRuleType

Obtém o tipo que a classe FileSystemSecurity usa para representar as regras de auditoria.Gets the type that the FileSystemSecurity class uses to represent audit rules.

(Inherited from FileSystemSecurity)
GroupModified GroupModified GroupModified GroupModified

Obtém ou define um valor booliano que especifica se o grupo associado ao objeto protegível foi modificado.Gets or sets a Boolean value that specifies whether the group associated with the securable object has been modified.

(Inherited from ObjectSecurity)
IsContainer IsContainer IsContainer IsContainer

Obtém um valor booliano que especifica se este ObjectSecurity é um objeto contêiner.Gets a Boolean value that specifies whether this ObjectSecurity object is a container object.

(Inherited from ObjectSecurity)
IsDS IsDS IsDS IsDS

Obtém um valor booliano que especifica se este ObjectSecurity é um objeto de diretório.Gets a Boolean value that specifies whether this ObjectSecurity object is a directory object.

(Inherited from ObjectSecurity)
OwnerModified OwnerModified OwnerModified OwnerModified

Obtém ou define um valor booliano que especifica se o proprietário do objeto protegível foi modificado.Gets or sets a Boolean value that specifies whether the owner of the securable object has been modified.

(Inherited from ObjectSecurity)
SecurityDescriptor SecurityDescriptor SecurityDescriptor SecurityDescriptor

Obtém o descritor de segurança para esta instância.Gets the security descriptor for this instance.

(Inherited from ObjectSecurity)

Aplica-se a