RegistrySecurity クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
レジストリ キーの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
- 継承
- 属性
例
このセクションには、2 つのコード例が含まれています。 最初の例では、追加と削除時に互換性のあるルールがどのようにマージされるかを示し、2 つ目は継承フラグと伝達フラグがルールの追加と削除にどのように影響するかを示しています。
例 1
次のコード例は、 RemoveAccessRule メソッドが互換性のある規則から権限を削除する方法と、 AddAccessRule メソッドが互換性のある規則と権限をマージする方法を示しています。
この例では、 RegistrySecurity オブジェクトを作成し、現在のユーザー RegistryRights.ReadKey 権限を許可する規則を追加します。 次に、最初のルールと同じ継承と伝達権限を持つユーザー RegistryRights.SetValueを付与するルールを作成し、 RemoveAccessRule メソッドを使用して、 RegistrySecurity オブジェクトからこの新しいルールを削除します。 SetValue は ReadKeyの構成要素であるため、互換性のある規則から削除されます。 RegistrySecurity オブジェクトのルールが表示され、ReadKeyの残りの構成要素が表示されます。
次に、AddAccessRule メソッドを呼び出して、SetValue オブジェクト内のルールにRegistrySecurityをマージします。
Note
この例では、セキュリティ オブジェクトを RegistryKey オブジェクトにアタッチしません。 このセクションの 2 番目の例では、セキュリティ オブジェクトをアタッチします。また、 RegistryKey.GetAccessControl と RegistryKey.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 フラグを持つ 2 つのルールを作成して追加します。 最初のルールには伝達フラグがなく、2 番目のルールには 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 オブジェクトによって表されます。
これにより、基になる Windows セキュリティ システムが反映されます。セキュリティ保護可能な各オブジェクトには、セキュリティで保護されたオブジェクトへのアクセスを制御する任意アクセス制御リスト (DACL) が最大 1 つ、監査対象のアクセス試行を指定するシステム アクセス制御リスト (SACL) が最大 1 つ存在します。 DACL と SACL は、ユーザーとグループのアクセスと監査を指定するアクセス制御エントリ (ACE) の順序付けされたリストです。 RegistryAccessRuleまたはRegistryAuditRule オブジェクトは、複数の ACE を表している場合があります。
Note
Windowsアクセス制御セキュリティはレジストリ キーにのみ適用できます。 キーに格納されている個々のキーと値のペアには適用できません。
RegistrySecurity、RegistryAccessRule、およびRegistryAuditRuleクラスでは、ACL と ACE の実装の詳細が非表示になります。 これにより、17 種類の ACE と、継承とアクセス権の伝達を正しく維持する複雑さを無視できます。 これらのオブジェクトは、次の一般的なアクセス制御エラーを防ぐためにも設計されています。
NULL DACL を使用してセキュリティ記述子を作成する。 DACL への null 参照を使用すると、すべてのユーザーがオブジェクトにアクセス 規則を追加でき、サービス拒否攻撃が発生する可能性があります。 新しい RegistrySecurity オブジェクトは常に空の DACL で始まり、すべてのユーザーのすべてのアクセスが拒否されます。
ACE の正規の順序に違反しています。 DACL の ACE リストが正規の順序で保持されていない場合、ユーザーにセキュリティで保護されたオブジェクトへのアクセス権が誤って与えられる可能性があります。 たとえば、拒否されたアクセス権は、許可されたアクセス権の前に常に表示される必要があります。 RegistrySecurity オブジェクトは内部的に正しい順序を維持します。
セキュリティ記述子フラグの操作。リソース マネージャーの制御下でのみ必要です。
ACE フラグの無効な組み合わせを作成しています。
継承された ACE の操作。 継承と伝達は、アクセス規則と監査規則に対して行った変更に応じて、リソース マネージャーによって処理されます。
ACL に意味のない ACE を挿入する。
.NET セキュリティ オブジェクトでサポートされていない唯一の機能は、次のような大多数のアプリケーション開発者が避けるべき危険なアクティビティです。
リソース マネージャーによって通常実行される低レベルのタスク。
正規の順序を維持しない方法でアクセス制御エントリを追加または削除する。
レジストリ キー Windowsアクセス制御のセキュリティを変更するには、RegistryKey.GetAccessControl メソッドを使用して、RegistrySecurity オブジェクトを取得します。 規則を追加および削除してセキュリティ オブジェクトを変更し、 RegistryKey.SetAccessControl メソッドを使用して再アタッチします。
Important
RegistrySecurity オブジェクトに加えた変更は、変更されたセキュリティ オブジェクトをレジストリ キーに割り当てるRegistryKey.SetAccessControl メソッドを呼び出すまで、レジストリ キーのアクセス レベルには影響しません。
1 つのレジストリ キーから別のレジストリ キーにアクセス制御セキュリティをコピーするには、 RegistryKey.GetAccessControl メソッドを使用して、最初のレジストリ キーのアクセス規則と監査規則を表す RegistrySecurity オブジェクトを取得し、 RegistryKey.SetAccessControl メソッドを使用してそれらの規則を 2 番目のレジストリ キーに割り当てます。 RegistryKey.OpenSubKey オブジェクト パラメーターを受け取るRegistryKey.CreateSubKeyまたはRegistrySecurityメソッドを使用して、2 つ目のレジストリ キーに規則を割り当てることもできます。
セキュリティ記述子定義言語 (SDDL) に投資しているユーザーは、 SetSecurityDescriptorSddlForm メソッドを使用してレジストリ キーのアクセス規則を設定し、 GetSecurityDescriptorSddlForm メソッドを使用して 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) 表現を返します。 (継承元 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(SafeHandle, AccessControlSections, Object) |
この NativeObjectSecurity オブジェクトに関連付けられているセキュリティ記述子の指定されたセクションを永続的ストレージに保存します。 コンストラクターと永続化メソッドに渡される |
| Persist(SafeHandle, AccessControlSections) |
この NativeObjectSecurity オブジェクトに関連付けられているセキュリティ記述子の指定されたセクションを永続的ストレージに保存します。 コンストラクターと persist メソッドに渡される |
| Persist(String, AccessControlSections, Object) |
この NativeObjectSecurity オブジェクトに関連付けられているセキュリティ記述子の指定されたセクションを永続的ストレージに保存します。 コンストラクターと永続化メソッドに渡される |
| Persist(String, AccessControlSections) |
この 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) 文字列から、この ObjectSecurity オブジェクトのセキュリティ記述子の指定されたセクションを設定します。 (継承元 ObjectSecurity) |
| SetSecurityDescriptorSddlForm(String) |
指定したセキュリティ記述子定義言語 (SDDL) 文字列から、この ObjectSecurity オブジェクトのセキュリティ記述子を設定します。 (継承元 ObjectSecurity) |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |
| WriteLock() |
この ObjectSecurity オブジェクトを書き込みアクセス用にロックします。 (継承元 ObjectSecurity) |
| WriteUnlock() |
書き込みアクセスのために、この ObjectSecurity オブジェクトのロックを解除します。 (継承元 ObjectSecurity) |