Use RtlSubAuthoritySid instead of directly poking SID
Signed-off-by: Shawn Hoffman <godisgovernment@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
6d6e219080
commit
cb1f62156e
2
wintun.c
2
wintun.c
@ -788,7 +788,7 @@ static NTSTATUS TunInitializeDispatchSecurityDescriptor(VOID)
|
||||
SID LocalSystem = { 0 };
|
||||
if (!NT_SUCCESS(Status = RtlInitializeSid(&LocalSystem, &NtAuthority, 1)))
|
||||
return Status;
|
||||
LocalSystem.SubAuthority[0] = 18;
|
||||
*RtlSubAuthoritySid(&LocalSystem, 0) = SECURITY_LOCAL_SYSTEM_RID;
|
||||
struct
|
||||
{
|
||||
ACL Dacl;
|
||||
|
Loading…
Reference in New Issue
Block a user