Close retired Windows offers before start and verify policy-preserving updater support
This commit is contained in:
@@ -152,6 +152,10 @@ function Install-ScriptHelper {
|
||||
$supported = & $binary --managed-script-helper-version
|
||||
if ($LASTEXITCODE -ne 0 -or $supported -cne 'managed-script-helper/1') { throw 'Update the agent pair and stable updater before enabling administrator scripts.' }
|
||||
}
|
||||
$preservesPolicy = & $worker --managed-script-policy-version
|
||||
if ($LASTEXITCODE -ne 0 -or $preservesPolicy -cne 'release-preserves-script-policy/1') {
|
||||
throw 'Administrator scripts require the stable updater that preserves the local policy during release switches and rollbacks.'
|
||||
}
|
||||
$id = [IO.File]::ReadAllText($identity) | ConvertFrom-Json
|
||||
$policy = [IO.File]::ReadAllText($timePath) | ConvertFrom-Json
|
||||
if ($policy.tenant_id -cne $installed.tenant_id -or $policy.job_signing_public_key_hex -cnotmatch '^[0-9a-f]{64}$') {
|
||||
|
||||
@@ -6,8 +6,10 @@ use axum::{
|
||||
extract::{Path, Query, State},
|
||||
http::{HeaderMap, StatusCode},
|
||||
};
|
||||
#[cfg(test)]
|
||||
use rmm_domain::jobs::Action;
|
||||
use rmm_domain::{
|
||||
jobs::{Action, ArtifactReference, JobPayload, PlanPayload, RecipeReference, encode, hash},
|
||||
jobs::{ArtifactReference, JobPayload, PlanPayload, RecipeReference, encode, hash},
|
||||
windows_execution::{MSI_PACKAGE_ID, ResolvedWindowsMsi, WindowsMsiRecipe},
|
||||
};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
Reference in New Issue
Block a user