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.SetAccessControlRegistryKey.GetAccessControl 예제도 연결합니다.


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 규칙을 만들고 추가합니다. 첫 번째 규칙에는 전파 플래그가 없지만 두 번째 규칙에는 및 InheritOnlyNoPropagateInherit 있습니다.

프로그램은 개체에 규칙을 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(액세스 제어 항목)의 순서가 지정된 목록입니다. 또는 RegistryAuditRule 개체는 RegistryAccessRule 둘 이상의 ACE를 나타낼 수 있습니다.

참고

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

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

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

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

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

  • ACE 플래그의 잘못된 조합을 만듭니다.

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

  • ACL에 의미 없는 ACL 삽입.

.NET 보안 개체에 의해 지원 되지 않습니다만 기능 대부분의 같은 애플리케이션 개발자는 피해 야 하는 위험한 작업 같습니다.

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

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

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

중요

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

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

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

생성자

RegistrySecurity()

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

속성

AccessRightType

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

AccessRulesModified

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

(다음에서 상속됨 ObjectSecurity)
AccessRuleType

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

AreAccessRulesCanonical

ObjectSecurity 개체와 관련된 액세스 규칙이 정식 순서대로 되어 있는지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
AreAccessRulesProtected

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

(다음에서 상속됨 ObjectSecurity)
AreAuditRulesCanonical

ObjectSecurity 개체와 관련된 감사 규칙이 정식 순서대로 되어 있는지 여부를 지정하는 부울 값을 가져옵니다.

(다음에서 상속됨 ObjectSecurity)
AreAuditRulesProtected

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

(다음에서 상속됨 ObjectSecurity)
AuditRulesModified

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

(다음에서 상속됨 ObjectSecurity)
AuditRuleType

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

GroupModified

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

(다음에서 상속됨 ObjectSecurity)
IsContainer

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

(다음에서 상속됨 ObjectSecurity)
IsDS

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

(다음에서 상속됨 ObjectSecurity)
OwnerModified

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

(다음에서 상속됨 ObjectSecurity)
SecurityDescriptor

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

(다음에서 상속됨 ObjectSecurity)

메서드

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(Security Descriptor Definition Language) 표현을 반환합니다.

(다음에서 상속됨 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 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자와 persist 메서드에는 동일한 includeSections 매개 변수 값을 전달하는 것이 좋습니다.

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

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

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

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

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

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

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

NativeObjectSecurity 개체와 연결된 보안 설명자의 지정된 섹션을 영구 스토리지에 저장합니다. 생성자와 persist 메서드에는 동일한 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[])

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

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

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

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

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

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

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

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

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

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

ObjectSecurity 개체에 대한 쓰기 액세스를 잠급니다.

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

ObjectSecurity 개체에 대한 쓰기 액세스의 잠금을 해제합니다.

(다음에서 상속됨 ObjectSecurity)

적용 대상