RegistrySecurity 클래스

정의

레지스트리 키에 대한 Windows 액세스 제어 보안을 나타냅니다. 이 클래스는 상속할 수 없습니다.

public ref class RegistrySecurity sealed : System::Security::AccessControl::NativeObjectSecurity
public sealed class RegistrySecurity : System.Security.AccessControl.NativeObjectSecurity
[System.Security.SecurityCritical]
public sealed class RegistrySecurity : System.Security.AccessControl.NativeObjectSecurity
type RegistrySecurity = class
    inherit NativeObjectSecurity
[<System.Security.SecurityCritical>]
type RegistrySecurity = class
    inherit NativeObjectSecurity
Public NotInheritable Class RegistrySecurity
Inherits NativeObjectSecurity
상속
특성

예제

이 섹션에는 두 가지 코드 예제가 포함되어 있습니다. 첫 번째 예제에서는 추가 및 제거 시 호환되는 규칙이 병합되는 방법을 보여 줍니다. 두 번째 예제에서는 상속 및 전파 플래그가 규칙의 추가 및 삭제에 미치는 영향을 보여 줍니다.

예제 1

다음 코드 예제에서는 메서드가 RemoveAccessRule 호환되는 규칙에서 권한을 제거하는 방법과 메서드가 AddAccessRule 호환되는 규칙과 권한을 병합하는 방법을 보여 줍니다.

이 예제에서는 개체를 RegistrySecurity 만들고 현재 사용자 RegistryRights.ReadKey 권한을 허용하는 규칙을 추가합니다. 그런 다음, 첫 번째 규칙과 동일한 상속 및 전파 권한을 가진 사용자에게 RegistryRights.SetValue권한을 부여하는 규칙을 만들고 메서드를 사용하여 RemoveAccessRule 개체에서 RegistrySecurity 이 새 규칙을 제거합니다. SetValue 는 구성 요소 ReadKey이므로 호환되는 규칙에서 제거됩니다. 개체의 RegistrySecurity 규칙이 표시되고 나머지 구성 요소가 ReadKey표시됩니다.

그런 다음 예제 코드는 메서드를 AddAccessRule 호출하여 개체의 SetValue 규칙에 오른쪽을 다시 병합합니다 RegistrySecurity .

메모

이 예제에서는 보안 개체를 개체에 RegistryKey 연결하지 않습니다. 이 섹션의 두 번째 예제에서는 보안 개체를 연결하고, 다음의 예제도 연결합니다 RegistryKey.GetAccessControlRegistryKey.SetAccessControl.


using System;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Security;
using Microsoft.Win32;

public class Example
{

    public static void Main()
    {

        string user = Environment.UserDomainName + "\\"
            + Environment.UserName;

        // Create a security object that grants no access.
        RegistrySecurity mSec = new RegistrySecurity();

        // Add a rule that grants the current user ReadKey
        // rights. ReadKey is a combination of four other 
        // rights. The rule is inherited by all 
        // contained subkeys.
        RegistryAccessRule rule = new RegistryAccessRule(user, 
            RegistryRights.ReadKey, 
            InheritanceFlags.ContainerInherit, 
            PropagationFlags.None, 
            AccessControlType.Allow);
        mSec.AddAccessRule(rule);

        // Create a rule that allows the current user only the 
        // right to query the key/value pairs of a key, using  
        // the same inheritance and propagation flags as the
        // first rule. QueryValues is a constituent of 
        // ReadKey, so when this rule is removed, using the 
        // RemoveAccessRule method, ReadKey is broken into
        // its constituent parts.
        rule = new RegistryAccessRule(user, 
            RegistryRights.QueryValues, 
            InheritanceFlags.ContainerInherit, 
            PropagationFlags.None, 
            AccessControlType.Allow);
        mSec.RemoveAccessRule(rule);

        // Display the rules in the security object.
        ShowSecurity(mSec);

        // Add the second rule back. It merges with the 
        // existing rule, so that the rule is now displayed
        // as ReadKey.
        mSec.AddAccessRule(rule);

        // Display the rules in the security object.
        ShowSecurity(mSec);
    }

    private static void ShowSecurity(RegistrySecurity security)
    {
        Console.WriteLine("\r\nCurrent access rules:\r\n");

        foreach( RegistryAccessRule ar in security.GetAccessRules(true, true, typeof(NTAccount)) )
        {
            Console.WriteLine("        User: {0}", ar.IdentityReference);
            Console.WriteLine("        Type: {0}", ar.AccessControlType);
            Console.WriteLine("      Rights: {0}", ar.RegistryRights);
            Console.WriteLine(" Inheritance: {0}", ar.InheritanceFlags);
            Console.WriteLine(" Propagation: {0}", ar.PropagationFlags);
            Console.WriteLine("   Inherited? {0}", ar.IsInherited);
            Console.WriteLine();
        }
    }
}

/* This code example produces output similar to following:

Current access rules:

        User: TestDomain\TestUser
        Type: Allow
      Rights: EnumerateSubKeys, Notify, ReadPermissions
 Inheritance: ContainerInherit
 Propagation: None
   Inherited? False


Current access rules:

        User: TestDomain\TestUser
        Type: Allow
      Rights: ReadKey
 Inheritance: ContainerInherit
 Propagation: None
   Inherited? False
 */
Option Explicit
Imports System.Security.AccessControl
Imports System.Security.Principal
Imports System.Security
Imports Microsoft.Win32

Public Class Example

    Public Shared Sub Main()

        Dim user As String = Environment.UserDomainName _ 
            & "\" & Environment.UserName

        ' Create a security object that grants no access.
        Dim mSec As New RegistrySecurity()

        ' Add a rule that grants the current user ReadKey
        ' rights. ReadKey is a combination of four other 
        ' rights. The rule is inherited by all 
        ' contained subkeys.
        Dim rule As New RegistryAccessRule(user, _
            RegistryRights.ReadKey, _
            InheritanceFlags.ContainerInherit, _
            PropagationFlags.None, _
            AccessControlType.Allow)
        mSec.AddAccessRule(rule)

        ' Create a rule that allows the current user only the 
        ' right to query the key/value pairs of a key, using  
        ' the same inheritance and propagation flags as the
        ' first rule. QueryValues is a constituent of 
        ' ReadKey, so when this rule is removed, using the 
        ' RemoveAccessRule method, ReadKey is broken into
        ' its constituent parts.
        rule = New RegistryAccessRule(user, _
            RegistryRights.QueryValues, _
            InheritanceFlags.ContainerInherit, _
            PropagationFlags.None, _
            AccessControlType.Allow)
        mSec.RemoveAccessRule(rule)

        ' Display the rules in the security object.
        ShowSecurity(mSec)

        ' Add the second rule back. It merges with the 
        ' existing rule, so that the rule is now displayed
        ' as ReadKey.
        mSec.AddAccessRule(rule)

        ' Display the rules in the security object.
        ShowSecurity(mSec)

    End Sub 

    Private Shared Sub ShowSecurity(ByVal security As RegistrySecurity)
        Console.WriteLine(vbCrLf & "Current access rules:" & vbCrLf)

        For Each ar As RegistryAccessRule In _
            security.GetAccessRules(True, True, GetType(NTAccount))

            Console.WriteLine("        User: {0}", ar.IdentityReference)
            Console.WriteLine("        Type: {0}", ar.AccessControlType)
            Console.WriteLine("      Rights: {0}", ar.RegistryRights)
            Console.WriteLine(" Inheritance: {0}", ar.InheritanceFlags)
            Console.WriteLine(" Propagation: {0}", ar.PropagationFlags)
            Console.WriteLine("   Inherited? {0}", ar.IsInherited)
            Console.WriteLine()
        Next

    End Sub
End Class 

'This code example produces output similar to following:
'
'Current access rules:
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: EnumerateSubKeys, Notify, ReadPermissions
' Inheritance: ContainerInherit
' Propagation: None
'   Inherited? False
'
'
'Current access rules:
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: ReadKey
' Inheritance: ContainerInherit
' Propagation: None
'   Inherited? False
'

예제 2

다음 코드 예제에서는 상속 및 전파를 사용하는 액세스 규칙을 보여 줍니다. 이 예제에서는 개체를 RegistrySecurity 만든 다음 플래그가 있는 두 개의 ContainerInherit 규칙을 만들고 추가합니다. 첫 번째 규칙에는 전파 플래그가 없지만 두 번째 규칙에는 NoPropagateInherit 전파 플래그가 있습니다 InheritOnly.

프로그램은 개체의 규칙을 RegistrySecurity 표시한 다음 개체를 RegistrySecurity 사용하여 하위 키를 만듭니다. 프로그램은 자식 하위 키와 손자 하위 키를 만든 다음 각 하위 키에 대한 보안을 표시합니다. 마지막으로 프로그램에서 테스트 키를 삭제합니다.


using System;
using System.Security.AccessControl;
using System.Security.Principal;
using System.Security;
using Microsoft.Win32;

public class Example
{
    public static void Main()
    {
        const string TestKey = "TestKey3927";
        RegistryKey cu = Registry.CurrentUser;

        string user = Environment.UserDomainName + 
            "\\" + Environment.UserName;

        // Create a security object that grants no access.
        RegistrySecurity mSec = new RegistrySecurity();

        // Add a rule that grants the current user the right
        // to read and enumerate the name/value pairs in a key, 
        // to read its access and audit rules, to enumerate
        // its subkeys, to create subkeys, and to delete the key. 
        // The rule is inherited by all contained subkeys.
        //
        RegistryAccessRule rule = new RegistryAccessRule(user, 
           RegistryRights.ReadKey | RegistryRights.WriteKey 
               | RegistryRights.Delete, 
           InheritanceFlags.ContainerInherit, 
           PropagationFlags.None, 
           AccessControlType.Allow
        );
        mSec.AddAccessRule(rule);

        // Add a rule that allows the current user the right
        // right to set the name/value pairs in a key. 
        // This rule is inherited by contained subkeys, but
        // propagation flags limit it to immediate child 
        // subkeys.
        rule = new RegistryAccessRule(user, 
            RegistryRights.ChangePermissions, 
            InheritanceFlags.ContainerInherit, 
            PropagationFlags.InheritOnly | 
                PropagationFlags.NoPropagateInherit, 
            AccessControlType.Allow);
        mSec.AddAccessRule(rule);

        // Display the rules in the security object.
        ShowSecurity(mSec);

        // Create the test key using the security object.
        //
        RegistryKey rk = cu.CreateSubKey(TestKey, 
            RegistryKeyPermissionCheck.ReadWriteSubTree, mSec);

        // Create a child subkey and a grandchild subkey, 
        // without security.
        RegistryKey rkChild = rk.CreateSubKey("ChildKey", 
            RegistryKeyPermissionCheck.ReadWriteSubTree);
        RegistryKey rkGrandChild = 
            rkChild.CreateSubKey("GrandChildKey", 
                RegistryKeyPermissionCheck.ReadWriteSubTree);

        Show(rk);
        Show(rkChild);
        Show(rkGrandChild);

        rkGrandChild.Close();
        rkChild.Close();
        rk.Close();

        cu.DeleteSubKeyTree(TestKey);
    }

    private static void Show(RegistryKey rk)
    {
        Console.WriteLine(rk.Name);
        ShowSecurity(rk.GetAccessControl());
    }

    private static void ShowSecurity(RegistrySecurity security)
    {
        Console.WriteLine("\r\nCurrent access rules:\r\n");

        foreach( RegistryAccessRule ar in security.GetAccessRules(true, true, typeof(NTAccount)) )
        {

            Console.WriteLine("        User: {0}", ar.IdentityReference);
            Console.WriteLine("        Type: {0}", ar.AccessControlType);
            Console.WriteLine("      Rights: {0}", ar.RegistryRights);
            Console.WriteLine(" Inheritance: {0}", ar.InheritanceFlags);
            Console.WriteLine(" Propagation: {0}", ar.PropagationFlags);
            Console.WriteLine("   Inherited? {0}", ar.IsInherited);
            Console.WriteLine();
        }
    }
}

/* This code example produces output similar to following:

Current access rules:

        User: TestDomain\TestUser
        Type: Allow
      Rights: SetValue, CreateSubKey, Delete, ReadKey
 Inheritance: ContainerInherit
 Propagation: None
   Inherited? False

        User: TestDomain\TestUser
        Type: Allow
      Rights: ChangePermissions
 Inheritance: ContainerInherit
 Propagation: NoPropagateInherit, InheritOnly
   Inherited? False

HKEY_CURRENT_USER\TestKey3927

Current access rules:

        User: TestDomain\TestUser
        Type: Allow
      Rights: SetValue, CreateSubKey, Delete, ReadKey
 Inheritance: ContainerInherit
 Propagation: None
   Inherited? False

        User: TestDomain\TestUser
        Type: Allow
      Rights: ChangePermissions
 Inheritance: ContainerInherit
 Propagation: NoPropagateInherit, InheritOnly
   Inherited? False

HKEY_CURRENT_USER\TestKey3927\ChildKey

Current access rules:

        User: TestDomain\TestUser
        Type: Allow
      Rights: SetValue, CreateSubKey, Delete, ReadKey
 Inheritance: ContainerInherit
 Propagation: None
   Inherited? True

        User: TestDomain\TestUser
        Type: Allow
      Rights: ChangePermissions
 Inheritance: None
 Propagation: None
   Inherited? True

HKEY_CURRENT_USER\TestKey3927\ChildKey\GrandChildKey

Current access rules:

        User: TestDomain\TestUser
        Type: Allow
      Rights: SetValue, CreateSubKey, Delete, ReadKey
 Inheritance: ContainerInherit
 Propagation: None
   Inherited? True
 */
Option Explicit
Imports System.Security.AccessControl
Imports System.Security.Principal
Imports System.Security
Imports Microsoft.Win32

Public Class Example

    Public Shared Sub Main()

        Const TestKey As String = "TestKey3927"
        Dim cu As RegistryKey = Registry.CurrentUser

        Dim user As String = Environment.UserDomainName _ 
            & "\" & Environment.UserName

        ' Create a security object that grants no access.
        Dim mSec As New RegistrySecurity()

        ' Add a rule that grants the current user the right
        ' to read and enumerate the name/value pairs in a key, 
        ' to read its access and audit rules, to enumerate
        ' its subkeys, to create subkeys, and to delete the key. 
        ' The rule is inherited by all contained subkeys.
        '
        Dim rule As New RegistryAccessRule(user, _
            RegistryRights.ReadKey Or RegistryRights.WriteKey _
                Or RegistryRights.Delete, _
            InheritanceFlags.ContainerInherit, _
            PropagationFlags.None, _
            AccessControlType.Allow)
        mSec.AddAccessRule(rule)

        ' Add a rule that allows the current user the right
        ' right to set the name/value pairs in a key. 
        ' This rule is inherited by contained subkeys, but
        ' propagation flags limit it to immediate child 
        ' subkeys.
        rule = New RegistryAccessRule(user, _
            RegistryRights.ChangePermissions, _
            InheritanceFlags.ContainerInherit, _
            PropagationFlags.InheritOnly Or PropagationFlags.NoPropagateInherit, _
            AccessControlType.Allow)
        mSec.AddAccessRule(rule)

        ' Display the rules in the security object.
        ShowSecurity(mSec)

        ' Create the test key using the security object.
        '
        Dim rk As RegistryKey = cu.CreateSubKey(TestKey, _
            RegistryKeyPermissionCheck.ReadWriteSubTree, _
            mSec)

        ' Create a child subkey and a grandchild subkey, 
        ' without security.
        Dim rkChild As RegistryKey= rk.CreateSubKey("ChildKey", _
            RegistryKeyPermissionCheck.ReadWriteSubTree)
        Dim rkGrandChild As RegistryKey = _
            rkChild.CreateSubKey("GrandChildKey", _
                RegistryKeyPermissionCheck.ReadWriteSubTree)

        Show(rk)
        Show(rkChild)
        Show(rkGrandChild)

        rkGrandChild.Close()
        rkChild.Close()
        rk.Close()

        cu.DeleteSubKeyTree(TestKey)
    End Sub 

    Private Shared Sub Show(ByVal rk As RegistryKey)
        Console.WriteLine(rk.Name)            
        ShowSecurity(rk.GetAccessControl())
    End Sub

    Private Shared Sub ShowSecurity(ByVal security As RegistrySecurity)
        Console.WriteLine(vbCrLf & "Current access rules:" & vbCrLf)

        For Each ar As RegistryAccessRule In _
            security.GetAccessRules(True, True, GetType(NTAccount))

            Console.WriteLine("        User: {0}", ar.IdentityReference)
            Console.WriteLine("        Type: {0}", ar.AccessControlType)
            Console.WriteLine("      Rights: {0}", ar.RegistryRights)
            Console.WriteLine(" Inheritance: {0}", ar.InheritanceFlags)
            Console.WriteLine(" Propagation: {0}", ar.PropagationFlags)
            Console.WriteLine("   Inherited? {0}", ar.IsInherited)
            Console.WriteLine()
        Next

    End Sub
End Class 

'This code example produces output similar to following:
'
'Current access rules:
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: SetValue, CreateSubKey, Delete, ReadKey
' Inheritance: ContainerInherit
' Propagation: None
'   Inherited? False
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: ChangePermissions
' Inheritance: ContainerInherit
' Propagation: NoPropagateInherit, InheritOnly
'   Inherited? False
'
'HKEY_CURRENT_USER\TestKey3927
'
'Current access rules:
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: SetValue, CreateSubKey, Delete, ReadKey
' Inheritance: ContainerInherit
' Propagation: None
'   Inherited? False
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: ChangePermissions
' Inheritance: ContainerInherit
' Propagation: NoPropagateInherit, InheritOnly
'   Inherited? False
'
'HKEY_CURRENT_USER\TestKey3927\ChildKey
'
'Current access rules:
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: SetValue, CreateSubKey, Delete, ReadKey
' Inheritance: ContainerInherit
' Propagation: None
'   Inherited? True
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: ChangePermissions
' Inheritance: None
' Propagation: None
'   Inherited? True
'
'HKEY_CURRENT_USER\TestKey3927\ChildKey\GrandChildKey
'
'Current access rules:
'
'        User: TestDomain\TestUser
'        Type: Allow
'      Rights: SetValue, CreateSubKey, Delete, ReadKey
' Inheritance: ContainerInherit
' Propagation: None
'   Inherited? True

설명

개체는 RegistrySecurity 레지스트리 키에 대한 액세스 권한을 지정하고 액세스 시도를 감사하는 방법도 지정합니다. 레지스트리 키에 대한 액세스 권한은 개체가 나타내는 각 액세스 규칙과 함께 규칙으로 RegistryAccessRule 표현됩니다. 각 감사 규칙은 개체로 RegistryAuditRule 표시됩니다.

이는 각 보안 개체에 보안 개체에 대한 액세스를 제어하는 DACL(임의 액세스 제어 목록)이 하나 이상 있고 감사할 액세스 시도를 지정하는 SACL(시스템 액세스 제어 목록)이 하나 이상 있는 기본 Windows 보안 시스템을 반영합니다. DACL 및 SACL은 사용자 및 그룹에 대한 액세스 및 감사를 지정하는 ACE(액세스 제어 항목)의 순서가 지정된 목록입니다. A RegistryAccessRule 또는 RegistryAuditRule 개체가 둘 이상의 ACE를 나타낼 수 있습니다.

메모

Windows 액세스 제어 보안은 레지스트리 키에만 적용할 수 있습니다. 키에 저장된 개별 키/값 쌍에는 적용할 수 없습니다.

RegistrySecurityRegistryAccessRule 클래스는 RegistryAuditRuleACL 및 ACE의 구현 세부 정보를 숨깁니다. 이를 통해 17가지 ACE 유형과 액세스 권한의 상속 및 전파를 올바르게 유지하는 복잡성을 무시할 수 있습니다. 이러한 개체는 다음과 같은 일반적인 액세스 제어 오류를 방지하도록 설계되었습니다.

  • null DACL을 사용하여 보안 설명자 만들기 DACL에 대한 null 참조를 사용하면 모든 사용자가 개체에 액세스 규칙을 추가하여 서비스 거부 공격을 만들 수 있습니다. 새 RegistrySecurity 개체는 항상 모든 사용자에 대한 모든 액세스를 거부하는 빈 DACL로 시작합니다.

  • ACE의 정식 순서를 위반하는 경우 DACL의 ACE 목록이 정식 순서로 유지되지 않으면 사용자에게 실수로 보안 개체에 대한 액세스 권한이 부여될 수 있습니다. 예를 들어 거부된 액세스 권한은 항상 허용된 액세스 권한 앞에 나타나야 합니다. RegistrySecurity 개체는 내부적으로 올바른 순서를 유지합니다.

  • 리소스 관리자 제어에만 있어야 하는 보안 설명자 플래그 조작

  • ACE 플래그의 잘못된 조합 만들기

  • 상속된 ACE 조작 상속 및 전파는 액세스 및 감사 규칙에 대한 변경 내용에 따라 리소스 관리자가 처리합니다.

  • 의미 없는 ACE를 ACL에 삽입합니다.

.NET 보안 개체에서 지원되지 않는 유일한 기능은 다음과 같은 대부분의 애플리케이션 개발자가 피해야 하는 위험한 활동입니다.

  • 리소스 관리자가 일반적으로 수행하는 하위 수준 작업입니다.

  • 정식 순서를 유지하지 않는 방식으로 액세스 제어 항목을 추가하거나 제거합니다.

레지스트리 키에 대한 Windows 액세스 제어 보안을 수정하려면 RegistryKey.GetAccessControl 메서드를 사용하여 RegistrySecurity 개체를 가져옵니다. 규칙을 추가 및 제거하여 보안 개체를 수정한 다음 메서드를 RegistryKey.SetAccessControl 사용하여 다시 연결합니다.

Important

변경된 보안 개체를 RegistrySecurity 레지스트리 키에 할당하기 위해 메서드를 호출 RegistryKey.SetAccessControl 할 때까지 개체를 변경해도 레지스트리 키의 액세스 수준에 영향을 미치지 않습니다.

한 레지스트리 키에서 다른 레지스트리 키로 액세스 제어 보안을 복사하려면 이 메서드를 RegistryKey.GetAccessControl 사용하여 RegistrySecurity 첫 번째 레지스트리 키에 대한 액세스 및 감사 규칙을 나타내는 개체를 가져옵니다. 그런 다음 이 메서드를 사용하여 RegistryKey.SetAccessControl 두 번째 레지스트리 키에 해당 규칙을 할당합니다. 개체 매개 변수를 사용하는 RegistryKey.OpenSubKey 메서드를 RegistryKey.CreateSubKey 사용하여 두 번째 레지스트리 키에 RegistrySecurity 규칙을 할당할 수도 있습니다.

SDDL(보안 설명자 정의 언어)에 투자한 사용자는 이 메서드를 사용하여 레지스트리 키에 대한 액세스 규칙을 설정하고, SetSecurityDescriptorSddlForm 이 메서드를 사용하여 GetSecurityDescriptorSddlForm SDDL 형식의 액세스 규칙을 나타내는 문자열을 가져올 수 있습니다. 새 개발에는 권장되지 않습니다.

생성자

Name Description
RegistrySecurity()

기본값을 사용하여 클래스의 새 인스턴스를 RegistrySecurity 초기화합니다.

속성

Name Description
AccessRightType

클래스가 액세스 권한을 나타내는 데 사용하는 열거형 형식 RegistrySecurity 을 가져옵니다.

AccessRulesModified

ObjectSecurity 개체와 연결된 액세스 규칙이 수정되었는지 여부를 지정하는 부울 값을 가져오거나 설정합니다.

(다음에서 상속됨 ObjectSecurity)
AccessRuleType

클래스가 RegistrySecurity 액세스 규칙을 나타내는 데 사용하는 형식을 가져옵니다.

AreAccessRulesCanonical

ObjectSecurity 개체와 연결된 액세스 규칙이 정식 순서인지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
AreAccessRulesProtected

이 개체와 연결된 DACL(임의 액세스 제어 목록)이 ObjectSecurity 보호되는지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
AreAuditRulesCanonical

ObjectSecurity 개체와 연결된 감사 규칙이 정식 순서인지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
AreAuditRulesProtected

이 개체와 연결된 SACL(시스템 액세스 제어 목록)이 ObjectSecurity 보호되는지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
AuditRulesModified

ObjectSecurity 개체와 연결된 감사 규칙이 수정되었는지 여부를 지정하는 부울 값을 가져오거나 설정합니다.

(다음에서 상속됨 ObjectSecurity)
AuditRuleType

클래스가 RegistrySecurity 감사 규칙을 나타내는 데 사용하는 형식을 가져옵니다.

GroupModified

보안 개체와 연결된 그룹이 수정되었는지 여부를 지정하는 부울 값을 가져오거나 설정합니다.

(다음에서 상속됨 ObjectSecurity)
IsContainer

ObjectSecurity 개체가 컨테이너 개체인지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
IsDS

ObjectSecurity 개체가 디렉터리 개체인지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
OwnerModified

보안 개체의 소유자가 수정되었는지 여부를 지정하는 부울 값을 가져오거나 설정합니다.

(다음에서 상속됨 ObjectSecurity)
SecurityDescriptor

이 인스턴스의 보안 설명자를 가져옵니다.

(다음에서 상속됨 ObjectSecurity)

메서드

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

지정된 액세스 권한, 액세스 제어 및 플래그를 사용하여 지정된 사용자에 대한 새 액세스 제어 규칙을 만듭니다.

AddAccessRule(AccessRule)

지정된 액세스 규칙을 이 CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에 추가합니다.

(다음에서 상속됨 CommonObjectSecurity)
AddAccessRule(RegistryAccessRule)

새 규칙을 병합할 수 있는 일치하는 액세스 제어를 검색합니다. 없는 경우 새 규칙을 추가합니다.

AddAuditRule(AuditRule)

지정된 감사 규칙을 이 CommonObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에 추가합니다.

(다음에서 상속됨 CommonObjectSecurity)
AddAuditRule(RegistryAuditRule)

새 규칙을 병합할 수 있는 감사 규칙을 검색합니다. 없는 경우 새 규칙을 추가합니다.

AuditRuleFactory(IdentityReference, Int32, Boolean, InheritanceFlags, PropagationFlags, AuditFlags)

규칙이 적용되는 사용자, 감사에 대한 액세스 권한, 규칙의 상속 및 전파 및 규칙을 트리거하는 결과를 지정하여 새 감사 규칙을 만듭니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetAccessRules(Boolean, Boolean, Type)

지정된 보안 식별자와 연결된 액세스 규칙의 컬렉션을 가져옵니다.

(다음에서 상속됨 CommonObjectSecurity)
GetAuditRules(Boolean, Boolean, Type)

지정된 보안 식별자와 연결된 감사 규칙의 컬렉션을 가져옵니다.

(다음에서 상속됨 CommonObjectSecurity)
GetGroup(Type)

지정된 소유자와 연결된 기본 그룹을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetOwner(Type)

지정된 기본 그룹과 연결된 소유자를 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
GetSecurityDescriptorBinaryForm()

ObjectSecurity 개체에 대한 보안 설명자 정보를 나타내는 바이트 값 배열을 반환합니다.

(다음에서 상속됨 ObjectSecurity)
GetSecurityDescriptorSddlForm(AccessControlSections)

ObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션에 대한 SDDL(보안 설명자 정의 언어) 표현을 반환합니다.

(다음에서 상속됨 ObjectSecurity)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ModifyAccess(AccessControlModification, AccessRule, Boolean)

지정된 수정 사항을 이 CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에 적용합니다.

(다음에서 상속됨 CommonObjectSecurity)
ModifyAccessRule(AccessControlModification, AccessRule, Boolean)

지정된 수정 사항을 이 ObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에 적용합니다.

(다음에서 상속됨 ObjectSecurity)
ModifyAudit(AccessControlModification, AuditRule, Boolean)

CommonObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에 지정된 수정 사항을 적용합니다.

(다음에서 상속됨 CommonObjectSecurity)
ModifyAuditRule(AccessControlModification, AuditRule, Boolean)

ObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에 지정된 수정 사항을 적용합니다.

(다음에서 상속됨 ObjectSecurity)
Persist(Boolean, String, AccessControlSections)

ObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자 및 지속 메서드에 전달된 매개 변수의 includeSections 값이 동일하도록 하는 것이 좋습니다.

(다음에서 상속됨 ObjectSecurity)
Persist(SafeHandle, AccessControlSections, Object)

NativeObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자 및 지속 메서드에 전달된 매개 변수의 includeSections 값이 동일하도록 하는 것이 좋습니다.

(다음에서 상속됨 NativeObjectSecurity)
Persist(SafeHandle, AccessControlSections)

NativeObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자와 지속 메서드에 전달된 매개 변수의 includeSections 값이 동일하도록 하는 것이 좋습니다.

(다음에서 상속됨 NativeObjectSecurity)
Persist(String, AccessControlSections, Object)

NativeObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자 및 지속 메서드에 전달된 매개 변수의 includeSections 값이 동일하도록 하는 것이 좋습니다.

(다음에서 상속됨 NativeObjectSecurity)
Persist(String, AccessControlSections)

NativeObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자 및 지속 메서드에 전달된 매개 변수의 includeSections 값이 동일하도록 하는 것이 좋습니다.

(다음에서 상속됨 NativeObjectSecurity)
PurgeAccessRules(IdentityReference)

지정된 에 연결된 모든 액세스 규칙을 제거합니다 IdentityReference.

(다음에서 상속됨 ObjectSecurity)
PurgeAuditRules(IdentityReference)

지정된 감사 규칙과 연결된 모든 감사 규칙을 제거합니다 IdentityReference.

(다음에서 상속됨 ObjectSecurity)
ReadLock()

읽기 액세스를 위해 이 ObjectSecurity 개체를 잠깁니다.

(다음에서 상속됨 ObjectSecurity)
ReadUnlock()

읽기 액세스를 위해 이 ObjectSecurity 개체의 잠금을 해제합니다.

(다음에서 상속됨 ObjectSecurity)
RemoveAccessRule(AccessRule)

CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에서 지정된 액세스 규칙과 동일한 보안 식별자 및 액세스 마스크를 포함하는 액세스 규칙을 제거합니다.

(다음에서 상속됨 CommonObjectSecurity)
RemoveAccessRule(RegistryAccessRule)

지정된 액세스 규칙과 동일한 사용자 및 AccessControlType (허용 또는 거부) 및 호환되는 상속 및 전파 플래그를 사용하여 액세스 제어 규칙을 검색합니다. 이러한 규칙이 발견되면 지정된 액세스 규칙에 포함된 권한이 제거됩니다.

RemoveAccessRuleAll(AccessRule)

CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에서 지정된 액세스 규칙과 동일한 보안 식별자가 있는 모든 액세스 규칙을 제거합니다.

(다음에서 상속됨 CommonObjectSecurity)
RemoveAccessRuleAll(RegistryAccessRule)

지정된 규칙과 동일한 사용자로 모든 액세스 제어 규칙을 검색하고 AccessControlType (허용 또는 거부) 해당 규칙을 찾은 경우 제거합니다.

RemoveAccessRuleSpecific(AccessRule)

CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에서 지정된 액세스 규칙과 정확히 일치하는 모든 액세스 규칙을 제거합니다.

(다음에서 상속됨 CommonObjectSecurity)
RemoveAccessRuleSpecific(RegistryAccessRule)

지정된 규칙과 정확히 일치하는 액세스 제어 규칙을 검색하고 있는 경우 제거합니다.

RemoveAuditRule(AuditRule)

CommonObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에서 지정된 감사 규칙과 동일한 보안 식별자 및 액세스 마스크를 포함하는 감사 규칙을 제거합니다.

(다음에서 상속됨 CommonObjectSecurity)
RemoveAuditRule(RegistryAuditRule)

지정된 규칙과 동일한 사용자와 호환되는 상속 및 전파 플래그를 사용하여 감사 제어 규칙을 검색합니다. 호환되는 규칙을 발견하면 지정된 규칙에 포함된 권한이 제거됩니다.

RemoveAuditRuleAll(AuditRule)

CommonObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에서 지정된 감사 규칙과 동일한 보안 식별자가 있는 모든 감사 규칙을 제거합니다.

(다음에서 상속됨 CommonObjectSecurity)
RemoveAuditRuleAll(RegistryAuditRule)

지정된 규칙과 동일한 사용자가 있는 모든 감사 규칙을 검색하고 있는 경우 제거합니다.

RemoveAuditRuleSpecific(AuditRule)

CommonObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에서 지정된 감사 규칙과 정확히 일치하는 모든 감사 규칙을 제거합니다.

(다음에서 상속됨 CommonObjectSecurity)
RemoveAuditRuleSpecific(RegistryAuditRule)

지정된 규칙과 정확히 일치하는 감사 규칙을 검색하고 있는 경우 제거합니다.

ResetAccessRule(AccessRule)

CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)의 모든 액세스 규칙을 제거한 다음 지정된 액세스 규칙을 추가합니다.

(다음에서 상속됨 CommonObjectSecurity)
ResetAccessRule(RegistryAccessRule)

지정된 규칙에 관계없이 AccessControlType지정된 규칙과 동일한 사용자로 모든 액세스 제어 규칙을 제거한 다음 지정된 규칙을 추가합니다.

SetAccessRule(AccessRule)

CommonObjectSecurity 개체와 연결된 DACL(임의 액세스 제어 목록)에서 지정된 액세스 규칙과 동일한 보안 식별자 및 한정자를 포함하는 모든 액세스 규칙을 제거한 다음 지정된 액세스 규칙을 추가합니다.

(다음에서 상속됨 CommonObjectSecurity)
SetAccessRule(RegistryAccessRule)

지정된 규칙과 동일한 사용자 및 AccessControlType (허용 또는 거부)를 가진 모든 액세스 제어 규칙을 제거한 다음 지정된 규칙을 추가합니다.

SetAccessRuleProtection(Boolean, Boolean)

ObjectSecurity 개체와 연결된 액세스 규칙의 보호를 설정하거나 제거합니다. 상속을 통해 부모 개체에서 보호된 액세스 규칙을 수정할 수 없습니다.

(다음에서 상속됨 ObjectSecurity)
SetAuditRule(AuditRule)

CommonObjectSecurity 개체와 연결된 SACL(시스템 액세스 제어 목록)에서 지정된 감사 규칙과 동일한 보안 식별자 및 한정자를 포함하는 모든 감사 규칙을 제거한 다음 지정된 감사 규칙을 추가합니다.

(다음에서 상속됨 CommonObjectSecurity)
SetAuditRule(RegistryAuditRule)

값에 관계없이 AuditFlags 지정된 규칙과 동일한 사용자가 있는 모든 감사 규칙을 제거한 다음 지정된 규칙을 추가합니다.

SetAuditRuleProtection(Boolean, Boolean)

ObjectSecurity 개체와 연결된 감사 규칙의 보호를 설정하거나 제거합니다. 상속을 통해 부모 개체에서 보호된 감사 규칙을 수정할 수 없습니다.

(다음에서 상속됨 ObjectSecurity)
SetGroup(IdentityReference)

ObjectSecurity 개체와 연결된 보안 설명자의 기본 그룹을 설정합니다.

(다음에서 상속됨 ObjectSecurity)
SetOwner(IdentityReference)

ObjectSecurity 개체와 연결된 보안 설명자의 소유자를 설정합니다.

(다음에서 상속됨 ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

지정된 바이트 값 배열에서 이 ObjectSecurity 개체에 대한 보안 설명자의 지정된 섹션을 설정합니다.

(다음에서 상속됨 ObjectSecurity)
SetSecurityDescriptorBinaryForm(Byte[])

지정된 바이트 값 배열에서 이 ObjectSecurity 개체의 보안 설명자를 설정합니다.

(다음에서 상속됨 ObjectSecurity)
SetSecurityDescriptorSddlForm(String, AccessControlSections)

지정된 SDDL(Security Descriptor Definition Language) 문자열에서 이 ObjectSecurity 개체에 대한 보안 설명자의 지정된 섹션을 설정합니다.

(다음에서 상속됨 ObjectSecurity)
SetSecurityDescriptorSddlForm(String)

지정된 SDDL(Security Descriptor Definition Language) 문자열에서 이 ObjectSecurity 개체의 보안 설명자를 설정합니다.

(다음에서 상속됨 ObjectSecurity)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)
WriteLock()

쓰기 액세스를 위해 이 ObjectSecurity 개체를 잠깁니다.

(다음에서 상속됨 ObjectSecurity)
WriteUnlock()

쓰기 액세스를 위해 이 ObjectSecurity 개체의 잠금을 해제합니다.

(다음에서 상속됨 ObjectSecurity)

적용 대상