Share via


CommonSecurityDescriptor 建構函式

定義

初始化 CommonSecurityDescriptor 類別的新執行個體。

多載

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) ,則 ACE) 的單一存取控制專案會 (ACE) ,讓每個人都能完整 (存取 AEFA) 新增至 DACL。 如果應用程式修改 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

SDDL 字串,從其中建立新的 CommonSecurityDescriptor 物件。

備註

如果建立新 RawSecurityDescriptor 物件的基礎安全性描述元包含 null 其任意存取控制清單 (DACL) ,則 ACE) 的單一存取控制專案會 (ACE) ,讓每個人都能完整 (存取 AEFA) 新增至 DACL。 如果應用程式修改 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) ,則 ACE) 的單一存取控制專案 (ACE) ,可讓所有人完整存取 (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 物件的 Discretionary 存取控制清單 (DACL)。

備註

如果建立新 RawSecurityDescriptor 物件的基礎安全性描述元包含 null 其任意存取控制清單 (DACL) ,則 ACE) 的單一存取控制專案會 (ACE) ,讓每個人都能完整 (存取 AEFA) 新增至 DACL。 如果應用程式修改 AEFA ACE 所新增之安全描述元的 DACL,則保存 DACL 時,AEFA ACE 會與 DACL 一起保存。

這可能會導致應用程式意外允許存取主體。 因此,應用程式應該檢查 AEFA ACE 是否存在,並在修改任何安全性描述元之前將其移除。

適用於