Fix bundle_identifier for common software in osquery-perf (#19023)

bundle_identifier should be unique for the common software (should not
have hostname name in it).
This commit is contained in:
Lucas Manuel Rodriguez 2024-05-24 09:26:42 -03:00 committed by GitHub
parent 4f315b89d3
commit b7aac2cfab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -1443,7 +1443,7 @@ func (a *agent) softwareMacOS() []map[string]string {
commonSoftware[i] = map[string]string{
"name": fmt.Sprintf("Common_%d.app", i),
"version": "0.0.1",
"bundle_identifier": fmt.Sprintf("com.fleetdm.osquery-perf.common_%s_%d", a.CachedString("hostname"), i),
"bundle_identifier": fmt.Sprintf("com.fleetdm.osquery-perf.common_%d", i),
"source": "apps",
"last_opened_at": lastOpenedAt,
"installed_path": fmt.Sprintf("/some/path/Common_%d.app", i),

View file

@ -17,7 +17,7 @@ services:
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=master-01",
# Required for storage of Apple MDM installers.
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912"
]
environment: &mysql-default-environment
@ -47,7 +47,7 @@ services:
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=master-01",
# Required for storage of Apple MDM installers.
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912"
]
environment: *mysql-default-environment

View file

@ -30,7 +30,7 @@ type softwareIDChecksum struct {
var countHostSoftwareBatchSize = uint64(100000)
// Since a host may have a lot of software items, we need to batch the inserts.
// The maximum number of software items we can insert at one time is governed by max_allowed_packet, which already be set to a high value for MDM installers,
// The maximum number of software items we can insert at one time is governed by max_allowed_packet, which already be set to a high value for MDM bootstrap packages,
// and by the maximum number of placeholders in a prepared statement, which is 65,536. These are already fairly large limits.
// This is a variable, so it can be adjusted during unit testing.
var softwareInsertBatchSize = 1000

View file

@ -14,7 +14,7 @@ services:
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=1",
# Required for storage of Apple MDM installers.
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912"
]
environment:
@ -44,7 +44,7 @@ services:
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=2",
# Required for storage of Apple MDM installers.
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912"
]
environment: *mysql-default-environment