Update
This commit is contained in:
1 parent
3530afb854
commit
6903fcff27
2146 files changed
+112256
-190703
No files matched your search
+13
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Package gp contains [Group Policy]-related functions and types.
|
||||
@@ -9,6 +9,7 @@ package gp
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
@@ -77,3 +78,14 @@ func toRefreshPolicyFlags(force bool) uint32 {
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var mgmtProductTailscale = unsafe.SliceData([]uint16{'T', 'a', 'i', 'l', 's', 'c', 'a', 'l', 'e', 0})
|
||||
|
||||
// NotifyMachinePolicyChange sends a machine-scoped group policy change
|
||||
// notification which Windows broadcasts to group policy change subscribers.
|
||||
// The caller must be running as LocalSystem.
|
||||
func NotifyMachinePolicyChange() error {
|
||||
// GenerateGPNotification is quasi-documented. Note that its implementation
|
||||
// contains an access check ensuring that the calling user is LocalSystem!
|
||||
return generateGPNotification(true, mgmtProductTailscale, 0)
|
||||
}
|
||||
Reference in new issue
Block a user