composd should open instance image RW
The instance image for the VMs composd creates should be read/write,
so that instance information can be updated.
We don't do this in verify_key, since it should only ever start an
existing instance and never modify it.
Bug: 186126194
Test: atest ComposTestCase
Change-Id: I1c5eaa17881e9b089a697b2b218163d192373936
diff --git a/compos/verify_key/verify_key.rs b/compos/verify_key/verify_key.rs
index 8439b97..0cc6473 100644
--- a/compos/verify_key/verify_key.rs
+++ b/compos/verify_key/verify_key.rs
@@ -87,8 +87,9 @@
let blob = read_small_file(blob).context("Failed to read key blob")?;
let public_key = read_small_file(public_key).context("Failed to read public key")?;
+ let instance_image = File::open(instance_image).context("Failed to open instance image")?;
- let vm_instance = VmInstance::start(&instance_image)?;
+ let vm_instance = VmInstance::start(instance_image)?;
let service = vm_instance.get_service()?;
let result = service.verifySigningKey(&blob, &public_key).context("Verifying signing key")?;