Provision the release-bound Windows maintenance helper on enrolled development devices
This commit is contained in:
@@ -106,6 +106,11 @@ impl Settings {
|
||||
.is_some_and(|h| h.contains(&m.recipe_sha256))
|
||||
})
|
||||
}
|
||||
pub(crate) fn windows_update_only(&self) -> bool {
|
||||
self.schema_version >= 3 && self.enable_effects && self.windows_update_max_runtime_seconds.is_some()
|
||||
&& self.allowed_script_profiles.is_none() && self.allowed_services.is_empty()
|
||||
&& self.allowed_msi_recipe_sha256.is_none() && !self.allow_reboot && self.max_runtime_seconds <= 30
|
||||
}
|
||||
fn permits_script(&self, job: &JobPayload) -> bool {
|
||||
self.schema_version >= 3
|
||||
&& job.execution_identity == "system"
|
||||
@@ -118,7 +123,7 @@ impl Settings {
|
||||
&& job.max_runtime_seconds <= job.action.windows_system_runtime_limit(self.max_runtime_seconds, self.windows_update_max_runtime_seconds)
|
||||
&& (self.allowed_script_profiles.as_deref()
|
||||
== Some(&[rmm_domain::jobs::PrivilegedScriptProfile::FullMaintenanceV1])
|
||||
|| (self.windows_update_max_runtime_seconds.is_some() && job.action.is_windows_update_template()))
|
||||
|| (self.windows_update_max_runtime_seconds.is_some() && job.action.windows_update_or_identity_probe()))
|
||||
}
|
||||
fn permits_reboot(&self, job: &JobPayload) -> bool {
|
||||
self.schema_version == 4
|
||||
@@ -886,7 +891,9 @@ impl SystemHelper {
|
||||
let pin = settings.pin()?;
|
||||
ipc::publish_self_query_rights(&settings.agent.service_sid, &settings.helper.service_sid)?;
|
||||
let (guard, db) = LedgerGuard::acquire(&settings.helper.service_sid, &settings.binding)?;
|
||||
let clock = RuntimeClock::new(rmm_time_attestation::Role::SystemHelper).for_generation(0);
|
||||
let clock = if settings.windows_update_only() {
|
||||
RuntimeClock::enrolled_windows_update_helper(settings.binding.clone(), settings.helper.clone())
|
||||
} else { RuntimeClock::new(rmm_time_attestation::Role::SystemHelper) }.for_generation(0);
|
||||
let boot = WindowsBoot::capture()?;
|
||||
let sync = HelperSync::with_verifier(settings.binding.clone(), DalekVerifier, &clock)
|
||||
.ok()
|
||||
|
||||
Reference in New Issue
Block a user