diff --git a/orbit/changes/8986-systemdrive-env-passthrough b/orbit/changes/8986-systemdrive-env-passthrough new file mode 100644 index 0000000000..4724604281 --- /dev/null +++ b/orbit/changes/8986-systemdrive-env-passthrough @@ -0,0 +1 @@ +- Pass `SystemDrive` Environemt variable to osqueryd when present in Orbit diff --git a/orbit/cmd/orbit/orbit.go b/orbit/cmd/orbit/orbit.go index 40e7b46099..d8eaa90b8c 100644 --- a/orbit/cmd/orbit/orbit.go +++ b/orbit/cmd/orbit/orbit.go @@ -815,6 +815,12 @@ func main() { ) } + if runtime.GOOS == "windows" { + if systemDrive, ok := os.LookupEnv("SystemDrive"); ok { + options = append(options, osquery.WithEnv([]string{fmt.Sprintf("SystemDrive=%s", systemDrive)})) + } + } + var certPath string if fleetURL != "https://" && c.Bool("insecure") { proxy, err := insecure.NewTLSProxy(fleetURL)