[PATCH 3/3] use RtlSubAuthoritySid instead of directly poking SID
Shawn Hoffman
godisgovernment at gmail.com
Sat Apr 25 01:43:27 CEST 2020
Signed-off-by: Shawn Hoffman <godisgovernment at gmail.com>
---
wintun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wintun.c b/wintun.c
index 00ac378..a6a0e16 100644
--- a/wintun.c
+++ b/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;
--
2.26.2.windows.1
More information about the WireGuard
mailing list