Skip to content

Commit 721b732

Browse files
Add SystemDrive env var to osqueryd if present in orbit (#25208)
1 parent 702cd4c commit 721b732

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Pass `SystemDrive` Environemt variable to osqueryd when present in Orbit

orbit/cmd/orbit/orbit.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,12 @@ func main() {
771771
)
772772
}
773773

774+
if runtime.GOOS == "windows" {
775+
if systemDrive, ok := os.LookupEnv("SystemDrive"); ok {
776+
options = append(options, osquery.WithEnv([]string{fmt.Sprintf("SystemDrive=%s", systemDrive)}))
777+
}
778+
}
779+
774780
var certPath string
775781
if fleetURL != "https://" && c.Bool("insecure") {
776782
proxy, err := insecure.NewTLSProxy(fleetURL)

0 commit comments

Comments
 (0)