CommonSecurityDescriptor 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 CommonSecurityDescriptor 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| CommonSecurityDescriptor(Boolean, Boolean, RawSecurityDescriptor) |
初始化指定CommonSecurityDescriptor物件中類別的新實例RawSecurityDescriptor。 |
| CommonSecurityDescriptor(Boolean, Boolean, String) |
從指定的安全描述符定義語言(SDDL)字串初始化該 CommonSecurityDescriptor 類別的新實例。 |
| CommonSecurityDescriptor(Boolean, Boolean, Byte[], Int32) |
從指定的位元組數陣列初始化該 CommonSecurityDescriptor 類別的新實例。 |
| CommonSecurityDescriptor(Boolean, Boolean, ControlFlags, SecurityIdentifier, SecurityIdentifier, SystemAcl, DiscretionaryAcl) |
根據指定資訊初始化該 CommonSecurityDescriptor 類別的新實例。 |
CommonSecurityDescriptor(Boolean, Boolean, RawSecurityDescriptor)
初始化指定CommonSecurityDescriptor物件中類別的新實例RawSecurityDescriptor。
public:
CommonSecurityDescriptor(bool isContainer, bool isDS, System::Security::AccessControl::RawSecurityDescriptor ^ rawSecurityDescriptor);
public CommonSecurityDescriptor(bool isContainer, bool isDS, System.Security.AccessControl.RawSecurityDescriptor rawSecurityDescriptor);
new System.Security.AccessControl.CommonSecurityDescriptor : bool * bool * System.Security.AccessControl.RawSecurityDescriptor -> System.Security.AccessControl.CommonSecurityDescriptor
Public Sub New (isContainer As Boolean, isDS As Boolean, rawSecurityDescriptor As RawSecurityDescriptor)
參數
- isContainer
- Boolean
true 如果新的安全描述符與容器物件相關聯。
- isDS
- Boolean
true 如果新的安全描述符與目錄物件相關聯,
- rawSecurityDescriptor
- RawSecurityDescriptor
用 RawSecurityDescriptor 來創造新 CommonSecurityDescriptor 物件的物件。
備註
若新物件所由 RawSecurityDescriptor 的底層安全描述符包含 null 其自由存取控制清單(DACL),則會新增一個允許所有人完全存取的單一存取控制條目(AEFA)。 若應用程式修改已加入 AEFA ACE 的安全描述符的 DACL,則當該 DACL 持續存在時,AEFA ACE 也會與該 DACL 一同持續存在。
這可能導致應用程式無意間允許存取主體。 因此,應用程式應檢查是否存在 AEFA ACE,並在修改任何安全描述符前將其移除。
適用於
CommonSecurityDescriptor(Boolean, Boolean, String)
從指定的安全描述符定義語言(SDDL)字串初始化該 CommonSecurityDescriptor 類別的新實例。
public:
CommonSecurityDescriptor(bool isContainer, bool isDS, System::String ^ sddlForm);
public CommonSecurityDescriptor(bool isContainer, bool isDS, string sddlForm);
new System.Security.AccessControl.CommonSecurityDescriptor : bool * bool * string -> System.Security.AccessControl.CommonSecurityDescriptor
Public Sub New (isContainer As Boolean, isDS As Boolean, sddlForm As String)
參數
- isContainer
- Boolean
true 如果新的安全描述符與容器物件相關聯。
- isDS
- Boolean
true 如果新的安全描述符與目錄物件相關聯,
- sddlForm
- String
用來建立新 CommonSecurityDescriptor 物件的 SDDL 字串。
備註
若新物件所由 RawSecurityDescriptor 的底層安全描述符包含 null 其自由存取控制清單(DACL),則會新增一個允許所有人完全存取的單一存取控制條目(AEFA)。 若應用程式修改已加入 AEFA ACE 的安全描述符的 DACL,則當該 DACL 持續存在時,AEFA ACE 也會與該 DACL 一同持續存在。
這可能導致應用程式無意間允許存取主體。 因此,應用程式應檢查是否存在 AEFA ACE,並在修改任何安全描述符前將其移除。
適用於
CommonSecurityDescriptor(Boolean, Boolean, Byte[], Int32)
從指定的位元組數陣列初始化該 CommonSecurityDescriptor 類別的新實例。
public:
CommonSecurityDescriptor(bool isContainer, bool isDS, cli::array <System::Byte> ^ binaryForm, int offset);
public CommonSecurityDescriptor(bool isContainer, bool isDS, byte[] binaryForm, int offset);
new System.Security.AccessControl.CommonSecurityDescriptor : bool * bool * byte[] * int -> System.Security.AccessControl.CommonSecurityDescriptor
Public Sub New (isContainer As Boolean, isDS As Boolean, binaryForm As Byte(), offset As Integer)
參數
- isContainer
- Boolean
true 如果新的安全描述符與容器物件相關聯。
- isDS
- Boolean
true 如果新的安全描述符與目錄物件相關聯,
- binaryForm
- Byte[]
用來建立新 CommonSecurityDescriptor 物件的位元組數陣列。
- offset
- Int32
陣列中 binaryForm 開始複製的偏移量。
備註
若新物件所從 RawSecurityDescriptor 底層安全描述符包含 null 其自由存取控制清單(DACL),則會新增一個允許所有人完全存取的單一存取控制條目(AEFA)到DACL。 若應用程式修改已加入 AEFA ACE 的安全描述符的 DACL,則當該 DACL 持續存在時,AEFA ACE 也會與該 DACL 一同持續存在。
這可能導致應用程式無意間允許存取主體。 因此,應用程式應檢查是否存在 AEFA ACE,並在修改任何安全描述符前將其移除。
適用於
CommonSecurityDescriptor(Boolean, Boolean, ControlFlags, SecurityIdentifier, SecurityIdentifier, SystemAcl, DiscretionaryAcl)
根據指定資訊初始化該 CommonSecurityDescriptor 類別的新實例。
public:
CommonSecurityDescriptor(bool isContainer, bool isDS, System::Security::AccessControl::ControlFlags flags, System::Security::Principal::SecurityIdentifier ^ owner, System::Security::Principal::SecurityIdentifier ^ group, System::Security::AccessControl::SystemAcl ^ systemAcl, System::Security::AccessControl::DiscretionaryAcl ^ discretionaryAcl);
public CommonSecurityDescriptor(bool isContainer, bool isDS, System.Security.AccessControl.ControlFlags flags, System.Security.Principal.SecurityIdentifier? owner, System.Security.Principal.SecurityIdentifier? group, System.Security.AccessControl.SystemAcl? systemAcl, System.Security.AccessControl.DiscretionaryAcl? discretionaryAcl);
public CommonSecurityDescriptor(bool isContainer, bool isDS, System.Security.AccessControl.ControlFlags flags, System.Security.Principal.SecurityIdentifier owner, System.Security.Principal.SecurityIdentifier group, System.Security.AccessControl.SystemAcl systemAcl, System.Security.AccessControl.DiscretionaryAcl discretionaryAcl);
new System.Security.AccessControl.CommonSecurityDescriptor : bool * bool * System.Security.AccessControl.ControlFlags * System.Security.Principal.SecurityIdentifier * System.Security.Principal.SecurityIdentifier * System.Security.AccessControl.SystemAcl * System.Security.AccessControl.DiscretionaryAcl -> System.Security.AccessControl.CommonSecurityDescriptor
Public Sub New (isContainer As Boolean, isDS As Boolean, flags As ControlFlags, owner As SecurityIdentifier, group As SecurityIdentifier, systemAcl As SystemAcl, discretionaryAcl As DiscretionaryAcl)
參數
- isContainer
- Boolean
true 如果新的安全描述符與容器物件相關聯。
- isDS
- Boolean
true 如果新的安全描述符與目錄物件相關聯,
- flags
- ControlFlags
指明新 CommonSecurityDescriptor 物件行為的旗標。
- owner
- SecurityIdentifier
新物件的 CommonSecurityDescriptor 擁有者。
- group
- SecurityIdentifier
新物件的主要群組 CommonSecurityDescriptor 。
- systemAcl
- SystemAcl
新 CommonSecurityDescriptor 物件的系統存取控制清單(SACL)。
- discretionaryAcl
- DiscretionaryAcl
新物件CommonSecurityDescriptor 物件的裁量存取控制清單(DACL)。
備註
若新物件所由 RawSecurityDescriptor 的底層安全描述符包含 null 其自由存取控制清單(DACL),則會新增一個允許所有人完全存取的單一存取控制條目(AEFA)。 若應用程式修改已加入 AEFA ACE 的安全描述符的 DACL,則當該 DACL 持續存在時,AEFA ACE 也會與該 DACL 一同持續存在。
這可能導致應用程式無意間允許存取主體。 因此,應用程式應檢查是否存在 AEFA ACE,並在修改任何安全描述符前將其移除。