diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-27 17:32:14 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-06-07 11:31:53 +0200 |
commit | 7b12ceede2b28ebe5dc22a50cb69fae1e97577a1 (patch) | |
tree | 9cb4a32a4ead2d32745b8df5787a11ed10c6cbc5 /tunnel/firewall | |
parent | ui: confview: add more super horrible wm_sizing hacks (diff) | |
download | wireguard-windows-7b12ceede2b28ebe5dc22a50cb69fae1e97577a1.tar.xz wireguard-windows-7b12ceede2b28ebe5dc22a50cb69fae1e97577a1.zip |
services: iterate through groups using helper
Diffstat (limited to 'tunnel/firewall')
-rw-r--r-- | tunnel/firewall/helpers.go | 3 |
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 } |