Share via


ObjectSecurity.SetSecurityDescriptorBinaryForm 方法

定义

根据指定的二进制数据设置此 ObjectSecurity 对象的安全描述符。

重载

SetSecurityDescriptorBinaryForm(Byte[])

根据指定的字节值数组设置此 ObjectSecurity 对象的安全描述符。

SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

根据指定的字节值数组设置此 ObjectSecurity 对象的安全描述符的指定部分。

注解

如果二进制数据表示的安全描述符包含 null 其自由访问控制列表 (DACL) ,则会 (ACE) 添加一个访问控制项, (AEFA) 向 DACL 添加一个允许所有人完全访问 (AEFA) 。 如果应用程序修改已向其添加 AEFA ACE 的安全描述符的 DACL,则保留该 DACL 时,AEFA ACE 将随 DACL 一起保留。

这可能会导致应用程序无意中允许访问主体。 因此,应用程序应检查是否存在 AEFA ACE,并在修改任何安全描述符之前将其删除。

SetSecurityDescriptorBinaryForm(Byte[])

根据指定的字节值数组设置此 ObjectSecurity 对象的安全描述符。

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[]

要根据其设置安全描述符的字节数组。

注解

如果二进制数据表示的安全描述符包含 null 其自由访问控制列表 (DACL) ,则会 (ACE) 添加一个访问控制项, (AEFA) 向 DACL 添加一个允许所有人完全访问 (AEFA) 。 如果应用程序修改已向其添加 AEFA ACE 的安全描述符的 DACL,则保留该 DACL 时,AEFA ACE 将随 DACL 一起保留。

这可能会导致应用程序无意中允许访问主体。 因此,应用程序应检查是否存在 AEFA ACE,并在修改任何安全描述符之前将其删除。

适用于

SetSecurityDescriptorBinaryForm(Byte[], AccessControlSections)

根据指定的字节值数组设置此 ObjectSecurity 对象的安全描述符的指定部分。

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[]

要根据其设置安全描述符的字节数组。

includeSections
AccessControlSections

要设置的安全描述符的部分(访问规则、审核规则、所有者、主要组)。

注解

如果二进制数据表示的安全描述符包含 null 其自由访问控制列表 (DACL) ,则会 (ACE) 添加一个访问控制项, (AEFA) 向 DACL 添加一个允许所有人完全访问 (AEFA) 。 如果应用程序修改已向其添加 AEFA ACE 的安全描述符的 DACL,则保留该 DACL 时,AEFA ACE 将随 DACL 一起保留。

这可能会导致应用程序无意中允许访问主体。 因此,应用程序应检查是否存在 AEFA ACE,并在修改任何安全描述符之前将其删除。

适用于