ObjectSecurity.SetSecurityDescriptorBinaryForm 方法

定義

從指定的二進位資料,設定這個 ObjectSecurity 物件的安全性描述元。Sets the security descriptor for this ObjectSecurity object from the specified binary data.

多載

SetSecurityDescriptorBinaryForm(Byte[])

從指定的位元組值陣列,設定這個 ObjectSecurity 物件的安全性描述元。Sets the security descriptor for this ObjectSecurity object from the specified array of byte values.

SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

從指定的位元組值陣列,設定這個 ObjectSecurity 物件之安全性描述元的指定區段。Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified array of byte values.

備註

如果二進位資料所代表的安全描述項包含null其任意存取控制清單(DACL),則會將允許每個人完整存取權(AEFA)的單一存取控制專案(ACE)新增至 DACL。If the security descriptor represented by the binary data contains null for its discretionary access control list (DACL), a single access control entry (ACE) that allows everyone full access (AEFA) is added to the DACL. 如果應用程式修改已加入 AEFA ACE 之安全描述項的 DACL,則在保存該 DACL 時,會使用 DACL 來保存 AEFA ACE。If an application modifies the DACL of a security descriptor to which an AEFA ACE has been added, the AEFA ACE is persisted with the DACL when that DACL is persisted.

這可能會導致應用程式不小心允許存取主體。This can result in an application unintentionally allowing access to principals. 因此,應用程式應該檢查 AEFA ACE 是否存在,並在修改任何安全描述項之前將它移除。Because of this, an application should check for the existence of an AEFA ACE and remove it before modifying any security descriptor.

SetSecurityDescriptorBinaryForm(Byte[])

從指定的位元組值陣列,設定這個 ObjectSecurity 物件的安全性描述元。Sets the security descriptor for this ObjectSecurity object from the specified array of byte values.

public:
 void SetSecurityDescriptorBinaryForm(cli::array <System::Byte> ^ binaryForm);
public void SetSecurityDescriptorBinaryForm (byte[] binaryForm);
member this.SetSecurityDescriptorBinaryForm : byte[] -> unit
Public Sub SetSecurityDescriptorBinaryForm (binaryForm As Byte())

參數

binaryForm
Byte[]

要從中設定安全性描述元的位元組陣列。The array of bytes from which to set the security descriptor.

備註

如果二進位資料所代表的安全描述項包含null其任意存取控制清單(DACL),則會將允許每個人完整存取權(AEFA)的單一存取控制專案(ACE)新增至 DACL。If the security descriptor represented by the binary data contains null for its discretionary access control list (DACL), a single access control entry (ACE) that allows everyone full access (AEFA) is added to the DACL. 如果應用程式修改已加入 AEFA ACE 之安全描述項的 DACL,則在保存該 DACL 時,會使用 DACL 來保存 AEFA ACE。If an application modifies the DACL of a security descriptor to which an AEFA ACE has been added, the AEFA ACE is persisted with the DACL when that DACL is persisted.

這可能會導致應用程式不小心允許存取主體。This can result in an application unintentionally allowing access to principals. 因此,應用程式應該檢查 AEFA ACE 是否存在,並在修改任何安全描述項之前將它移除。Because of this, an application should check for the existence of an AEFA ACE and remove it before modifying any security descriptor.

SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

從指定的位元組值陣列,設定這個 ObjectSecurity 物件之安全性描述元的指定區段。Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified array of byte values.

public:
 void SetSecurityDescriptorBinaryForm(cli::array <System::Byte> ^ binaryForm, System::Security::AccessControl::AccessControlSections includeSections);
public void SetSecurityDescriptorBinaryForm (byte[] binaryForm, System.Security.AccessControl.AccessControlSections includeSections);
member this.SetSecurityDescriptorBinaryForm : byte[] * System.Security.AccessControl.AccessControlSections -> unit
Public Sub SetSecurityDescriptorBinaryForm (binaryForm As Byte(), includeSections As AccessControlSections)

參數

binaryForm
Byte[]

要從中設定安全性描述元的位元組陣列。The array of bytes from which to set the security descriptor.

includeSections
AccessControlSections

要設定的安全性描述元區段 (存取規則、稽核規則、擁有者、主要群組)。The sections (access rules, audit rules, owner, primary group) of the security descriptor to set.

備註

如果二進位資料所代表的安全描述項包含null其任意存取控制清單(DACL),則會將允許每個人完整存取權(AEFA)的單一存取控制專案(ACE)新增至 DACL。If the security descriptor represented by the binary data contains null for its discretionary access control list (DACL), a single access control entry (ACE) that allows everyone full access (AEFA) is added to the DACL. 如果應用程式修改已加入 AEFA ACE 之安全描述項的 DACL,則在保存該 DACL 時,會使用 DACL 來保存 AEFA ACE。If an application modifies the DACL of a security descriptor to which an AEFA ACE has been added, the AEFA ACE is persisted with the DACL when that DACL is persisted.

這可能會導致應用程式不小心允許存取主體。This can result in an application unintentionally allowing access to principals. 因此,應用程式應該檢查 AEFA ACE 是否存在,並在修改任何安全描述項之前將它移除。Because of this, an application should check for the existence of an AEFA ACE and remove it before modifying any security descriptor.

適用於