From 4837f40389871193eff4c5652a1c6e33b19fb570 Mon Sep 17 00:00:00 2001 From: Michael McCracken Date: Thu, 26 Sep 2024 15:24:03 -0700 Subject: [PATCH] verity: also check corruption in existing mounts If we are mounting a mol where one of the atoms already been mounted, then we should check the already-mounted devices for any corruption reported by devicemapper as well, and at least fail to mount the new image using them. Signed-off-by: Michael McCracken --- molecule.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/molecule.go b/molecule.go index 5ba3497..619bec5 100644 --- a/molecule.go +++ b/molecule.go @@ -61,6 +61,10 @@ func (m Molecule) mountUnderlyingAtoms() error { if err != nil { return err } + err = squashfs.ConfirmExistingVerityDeviceCurrentValidity(mountpoint.Source) + if err != nil { + return err + } } continue }