mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use supported API to set CAPID in the SACL (#4496)
This commit is contained in:
committed by
Dongbo Wang
parent
b63a25c7f6
commit
7a03b0c7b9
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user