Use supported API to set CAPID in the SACL (#4496)

This commit is contained in:
Travis Plunk
2017-08-04 12:29:00 -07:00
committed by Dongbo Wang
parent b63a25c7f6
commit 7a03b0c7b9
2 changed files with 3 additions and 3 deletions
@@ -1194,7 +1194,7 @@ namespace Microsoft.PowerShell.Commands
}
// Add CAPID to the SACL.
rs = NativeMethods.RtlAddScopedPolicyIDAce(
rs = NativeMethods.AddScopedPolicyIDAce(
pSacl,
NativeMethods.ACL_REVISION,
NativeMethods.SUB_CONTAINERS_AND_OBJECTS_INHERIT,
@@ -1786,8 +1786,8 @@ namespace System.Management.Automation.Security
uint nAclLength,
uint dwAclRevision);
[DllImport("ntdll.dll", CharSet = CharSet.Unicode)]
internal static extern uint RtlAddScopedPolicyIDAce(
[DllImport("api-ms-win-security-base-l1-2-0.dll", CharSet = CharSet.Unicode)]
internal static extern uint AddScopedPolicyIDAce(
IntPtr Acl,
uint AceRevision,
uint AceFlags,