Provision the release-bound Windows maintenance helper on enrolled development devices

This commit is contained in:
2026-11-17 16:35:01 +01:00
parent a799272d91
commit 863dcb04b1
9 changed files with 215 additions and 34 deletions
+10 -9
View File
@@ -243,15 +243,16 @@ impl PeerPin {
self.service_sid == service_sid(name)? && digest(&self.binary_sha256),
"HELPER_PEER_PIN"
);
ensure!(
self.binary
== Path::new(if helper {
r"C:\Program Files\RustDiscovery\rmm-helper-windows.exe"
} else {
r"C:\Program Files\RustDiscovery\rmm-agent-windows.exe"
}),
"HELPER_FIXED_IMAGE"
);
// The byte pin and SCM command still have to match the running image.
let root = Path::new(r"C:\Program Files\RustDiscovery");
let name = if helper { "rmm-helper-windows.exe" } else { "rmm-agent-windows.exe" };
let published = self.binary.parent().and_then(|dir| {
let id = dir.file_name()?.to_str()?;
let release = Uuid::parse_str(id).ok()?;
Some(!release.is_nil() && id == release.to_string()
&& self.binary == root.join("releases").join(id).join(name))
}).unwrap_or(false);
ensure!(self.binary == root.join(name) || published, "HELPER_FIXED_IMAGE");
Ok(())
}
fn command(&self) -> String {