diff --git a/orbit/changes/fix-enroll-secret b/orbit/changes/fix-enroll-secret new file mode 100644 index 0000000000..2e9ac03a8f --- /dev/null +++ b/orbit/changes/fix-enroll-secret @@ -0,0 +1 @@ +* Fix handling of enroll secrets to address 0.0.3 enrollment issue. diff --git a/orbit/cmd/orbit/orbit.go b/orbit/cmd/orbit/orbit.go index a8ff41dcac..53fd93490c 100644 --- a/orbit/cmd/orbit/orbit.go +++ b/orbit/cmd/orbit/orbit.go @@ -219,7 +219,7 @@ func main() { if enrollSecret != "" { const enrollSecretEnvName = "ENROLL_SECRET" options = append(options, - osquery.WithEnv([]string{enrollSecretEnvName, enrollSecret}), + osquery.WithEnv([]string{enrollSecretEnvName + "=" + enrollSecret}), osquery.WithFlags([]string{"--enroll_secret_env", enrollSecretEnvName}), ) } diff --git a/orbit/pkg/update/hash.go b/orbit/pkg/update/hash.go index 5cd509c6ee..634135fe59 100644 --- a/orbit/pkg/update/hash.go +++ b/orbit/pkg/update/hash.go @@ -38,7 +38,7 @@ func CheckFileHash(meta *data.TargetFileMeta, localPath string) error { } // selectHashFunction returns the first matching hash function and expected -// hash, otherwise returning an error if not matching hash can be found. +// hash, otherwise returning an error if no matching hash can be found. // // SHA512 is preferred, and SHA256 is returned if 512 is not available.