mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
go.mod, cmd/tailscaled, ipn/localapi, util/osdiag, util/winutil, util/winutil/authenticode: add Windows module list to OS-specific logs that are written upon bugreport
* We update wingoes to pick up new version information functionality (See pe/version.go in the https://github.com/dblohm7/wingoes repo); * We move the existing LogSupportInfo code (including necessary syscall stubs) out of util/winutil into a new package, util/osdiag, and implement the public LogSupportInfo function may be implemented for other platforms as needed; * We add a new reason argument to LogSupportInfo and wire that into localapi's bugreport implementation; * We add module information to the Windows implementation of LogSupportInfo when reason indicates a bugreport. We enumerate all loaded modules in our process, and for each one we gather debug, authenticode signature, and version information. Fixes #7802 Signed-off-by: Aaron Klotz <aaron@tailscale.com>
This commit is contained in:
23
util/osdiag/osdiag.go
Normal file
23
util/osdiag/osdiag.go
Normal file
@@ -0,0 +1,23 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Package osdiag provides loggers for OS-specific diagnostic information.
|
||||
package osdiag
|
||||
|
||||
import "tailscale.com/types/logger"
|
||||
|
||||
// LogSupportInfoReason is an enumeration indicating the reason for logging
|
||||
// support info.
|
||||
type LogSupportInfoReason int
|
||||
|
||||
const (
|
||||
LogSupportInfoReasonStartup LogSupportInfoReason = iota + 1 // tailscaled is starting up.
|
||||
LogSupportInfoReasonBugReport // a bugreport is in the process of being gathered.
|
||||
)
|
||||
|
||||
// LogSupportInfo obtains OS-specific diagnostic information useful for
|
||||
// troubleshooting and support, and writes it to logf. The reason argument is
|
||||
// useful for governing the verbosity of this function's output.
|
||||
func LogSupportInfo(logf logger.Logf, reason LogSupportInfoReason) {
|
||||
logSupportInfo(logf, reason)
|
||||
}
|
Reference in New Issue
Block a user