mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
Due to a fundamental OS limitation with macos, when trying to update an application via mdm, the os cannot replace app files while the app is running. When this state is detected explicitly raise an error message stating that the application needs to be closed prior to updating. **Related issue:** Resolves #31972 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. - [x] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements) ## Testing - [x] Added/updated automated tests - [x] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [ ] QA'd all new/changed functionality manually --------- Co-authored-by: Scott Gress <scottmgress@gmail.com>
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
/** The original mdm command status representation */
|
|
export type CommandStatus = "Pending" | "Acknowledged" | "Error" | "NotNow";
|
|
|
|
/** The fleet representation of command status */
|
|
export type FleetCommandStatus = "ran" | "pending" | "failed";
|
|
|
|
export interface ICommand {
|
|
host_uuid: string;
|
|
command_uuid: string;
|
|
status: CommandStatus;
|
|
command_status: FleetCommandStatus;
|
|
updated_at: string;
|
|
request_type: string;
|
|
hostname: string;
|
|
}
|
|
|
|
/**
|
|
* Shape of an mdm command result object returned by the Fleet API.
|
|
*/
|
|
export interface ICommandResult {
|
|
host_uuid: string;
|
|
command_uuid: string;
|
|
/** Status of the command. It can be one of Acknowledged, Error, or NotNow for
|
|
// Apple, or 200, 400, etc for Windows. */
|
|
status: string;
|
|
updated_at: string;
|
|
request_type: string;
|
|
hostname: string;
|
|
/** Base64-encoded string containing the MDM command request */
|
|
payload: string;
|
|
/** Base64-encoded string containing the MDM command response */
|
|
result: string;
|
|
/** ResultsMetadata contains command-specific metadata.
|
|
* VPP install commands includes a "software_installed" boolean. */
|
|
results_metadata?: Record<string, unknown>;
|
|
}
|
|
|
|
export type IMDMCommandResult = ICommandResult;
|