util/osdiag, util/winutil: expose Windows policy key

The Windows base registry key is already exported but the policy key was
not. util/osdiag currently replicates the string rather than the
preferred approach of reusing the constant.

Updates #cleanup

Change-Id: I6c1c45337896c744059b85643da2364fb3f232f2
Signed-off-by: Adrian Dewhurst <adrian@tailscale.com>
This commit is contained in:
Adrian Dewhurst
2023-10-23 13:54:53 -04:00
committed by Adrian Dewhurst
parent 855f79fad7
commit 1ef5bd5381
3 changed files with 12 additions and 4 deletions

View File

@@ -54,7 +54,7 @@ const (
func getSupportInfo(w io.Writer, reason LogSupportInfoReason) error {
output := make(map[string]any)
regInfo, err := getRegistrySupportInfo(registry.LOCAL_MACHINE, []string{`SOFTWARE\Policies\Tailscale`, winutil.RegBase})
regInfo, err := getRegistrySupportInfo(registry.LOCAL_MACHINE, []string{winutil.RegPolicyBase, winutil.RegBase})
if err == nil {
output[supportInfoKeyRegistry] = regInfo
} else {