aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tunnel/firewall
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-05-27 17:32:14 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-07 11:31:53 +0200
commit80dac19b62ef6a84f2371dbd0b0f6c4928e4a6d1 (patch)
tree9cb4a32a4ead2d32745b8df5787a11ed10c6cbc5 /tunnel/firewall
parentui: confview: add more super horrible wm_sizing hacks (diff)
downloadwireguard-windows-80dac19b62ef6a84f2371dbd0b0f6c4928e4a6d1.tar.xz
wireguard-windows-80dac19b62ef6a84f2371dbd0b0f6c4928e4a6d1.zip
services: iterate through groups using helper
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/firewall')
-rw-r--r--tunnel/firewall/helpers.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/tunnel/firewall/helpers.go b/tunnel/firewall/helpers.go
index 1c60558b..237a5f57 100644
--- a/tunnel/firewall/helpers.go
+++ b/tunnel/firewall/helpers.go
@@ -84,8 +84,7 @@ func getCurrentProcessSecurityDescriptor() (*wtFwpByteBlob, error) {
return nil, wrapErr(err)
}
var sid *windows.SID
- groups := (*[(1 << 28) - 1]windows.SIDAndAttributes)(unsafe.Pointer(&gs.Groups[0]))[:gs.GroupCount]
- for _, g := range groups {
+ for _, g := range gs.AllGroups() {
if g.Attributes != windows.SE_GROUP_ENABLED|windows.SE_GROUP_ENABLED_BY_DEFAULT|windows.SE_GROUP_OWNER {
continue
}