ObjectSecurity.SetSecurityDescriptorSddlForm ObjectSecurity.SetSecurityDescriptorSddlForm ObjectSecurity.SetSecurityDescriptorSddlForm ObjectSecurity.SetSecurityDescriptorSddlForm Method

定義

從指定的安全性描述元定義語言 (SDDL) 字串,設定這個 ObjectSecurity 物件的安全性描述元。Sets the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

多載

SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String)

從指定的安全性描述元定義語言 (SDDL) 字串,設定這個 ObjectSecurity 物件的安全性描述元。Sets the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections)

從指定的安全性描述元定義語言 (SDDL) 字串,設定這個 ObjectSecurity 物件的安全性描述元之指定區段。Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

備註

如果 SDDL 字串所代表的安全描述項包含null其任意存取控制清單(DACL),則會將允許每個人完整存取權(AEFA)的單一存取控制專案(ACE)新增至 DACL。If the security descriptor represented by the SDDL string 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.

SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String) SetSecurityDescriptorSddlForm(String)

從指定的安全性描述元定義語言 (SDDL) 字串,設定這個 ObjectSecurity 物件的安全性描述元。Sets the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

public:
 void SetSecurityDescriptorSddlForm(System::String ^ sddlForm);
public void SetSecurityDescriptorSddlForm (string sddlForm);
member this.SetSecurityDescriptorSddlForm : string -> unit
Public Sub SetSecurityDescriptorSddlForm (sddlForm As String)

參數

sddlForm
String String String String

要從中設定安全性描述元的 SDDL 字串。The SDDL string from which to set the security descriptor.

備註

如果 SDDL 字串所代表的安全描述項包含null其任意存取控制清單(DACL),則會將允許每個人完整存取權(AEFA)的單一存取控制專案(ACE)新增至 DACL。If the security descriptor represented by the SDDL string 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.

SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections) SetSecurityDescriptorSddlForm(String, AccessControlSections)

從指定的安全性描述元定義語言 (SDDL) 字串,設定這個 ObjectSecurity 物件的安全性描述元之指定區段。Sets the specified sections of the security descriptor for this ObjectSecurity object from the specified Security Descriptor Definition Language (SDDL) string.

public:
 void SetSecurityDescriptorSddlForm(System::String ^ sddlForm, System::Security::AccessControl::AccessControlSections includeSections);
public void SetSecurityDescriptorSddlForm (string sddlForm, System.Security.AccessControl.AccessControlSections includeSections);
member this.SetSecurityDescriptorSddlForm : string * System.Security.AccessControl.AccessControlSections -> unit
Public Sub SetSecurityDescriptorSddlForm (sddlForm As String, includeSections As AccessControlSections)

參數

sddlForm
String String String String

要從中設定安全性描述元的 SDDL 字串。The SDDL string from which to set the security descriptor.

includeSections
AccessControlSections AccessControlSections AccessControlSections AccessControlSections

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

備註

如果 SDDL 字串所代表的安全描述項包含null其任意存取控制清單(DACL),則會將允許每個人完整存取權(AEFA)的單一存取控制專案(ACE)新增至 DACL。If the security descriptor represented by the SDDL string 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.

適用於