aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel
diff options
context:
space:
mode:
Diffstat (limited to 'tunnel')
-rw-r--r--tunnel/firewall/helpers.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/tunnel/firewall/helpers.go b/tunnel/firewall/helpers.go
index 6bc71806..ee783c2d 100644
--- a/tunnel/firewall/helpers.go
+++ b/tunnel/firewall/helpers.go
@@ -87,22 +87,12 @@ func getCurrentProcessSecurityDescriptor() (*wtFwpByteBlob, error) {
if g.Attributes != windows.SE_GROUP_ENABLED|windows.SE_GROUP_ENABLED_BY_DEFAULT|windows.SE_GROUP_OWNER {
continue
}
- if *(*byte)(unsafe.Pointer(g.Sid)) != 1 { // The revision.
- continue
- }
- if *getSidIdentifierAuthority(g.Sid) != windows.SECURITY_NT_AUTHORITY {
- continue
- }
// We could be checking != 6, but hopefully Microsoft will update
// RtlCreateServiceSid to use SHA2, which will then likely bump
// this up. So instead just roll with a minimum.
- if *getSidSubAuthorityCount(g.Sid) < 6 {
+ if !g.Sid.IsValid() || g.Sid.IdentifierAuthority() != windows.SECURITY_NT_AUTHORITY || g.Sid.SubAuthorityCount() < 6 || g.Sid.SubAuthority(0) != 80 {
continue
}
- if *getSidSubAuthority(g.Sid, 0) != 80 {
- continue
- }
-
sid = g.Sid
break
}