aboutsummaryrefslogtreecommitdiffstats
path: root/wintun.c
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2020-04-24 16:43:27 -0700
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 17:00:20 +0100
commitcb1f62156e0661f733d4a54b81cc77433776b8f2 (patch)
tree73e635c9b92794a3d06d1b234998d0b0f4e1be55 /wintun.c
parentReschedule EvaluateWintun between InstallInitialize and InstallFinalize (diff)
downloadwintun-cb1f62156e0661f733d4a54b81cc77433776b8f2.tar.xz
wintun-cb1f62156e0661f733d4a54b81cc77433776b8f2.zip
Use RtlSubAuthoritySid instead of directly poking SID
Signed-off-by: Shawn Hoffman <godisgovernment@gmail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'wintun.c')
-rw-r--r--wintun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wintun.c b/wintun.c
index 624de2f..12ef467 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;