Development discussion of WireGuard
 help / color / mirror / Atom feed
From: godisgovernment at gmail.com (Shawn Hoffman)
Subject: [PATCH 3/3] use RtlSubAuthoritySid instead of directly poking SID
Date: Fri, 24 Apr 2020 16:43:27 -0700
Message-ID: <20200424234327.1814-3-godisgovernment@gmail.com> (raw)
In-Reply-To: <20200424234327.1814-1-godisgovernment@gmail.com>

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



  parent reply	other threads:[~2020-04-24 23:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 23:43 [PATCH 1/3] fix possible TunDispatchSecurityDescriptor leak godisgovernment
2020-04-24 23:43 ` [PATCH 2/3] use ExEnterCriticalRegionAndAcquireResourceExclusive and ExReleaseResourceAndLeaveCriticalRegion godisgovernment
2020-04-26  3:52   ` godisgovernment
2020-10-30 16:05     ` Jason A. Donenfeld
2020-04-24 23:43 ` godisgovernment [this message]
2020-10-30 15:59   ` [PATCH 3/3] use RtlSubAuthoritySid instead of directly poking SID Jason A. Donenfeld
2020-10-30 16:05 ` [PATCH 1/3] fix possible TunDispatchSecurityDescriptor leak Jason A. Donenfeld
  -- strict thread matches above, loose matches on Subject: below --
2020-04-24 18:59 [PATCH 0/3] misc code cleanup godisgovernment
2020-04-24 18:59 ` [PATCH 3/3] use RtlSubAuthoritySid instead of directly poking SID godisgovernment

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200424234327.1814-3-godisgovernment@gmail.com \
    --to= \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/wireguard

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 wireguard wireguard/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git