Repository navigation
Commit 00574d5
initramfs: Mount composefs candidates by digest with an explicit policy
composefs-rs now provides Repository::mount_digest, which takes the
expected digest as a typed value, only looks at images/<digest> and
requires the measured fs-verity digest to match before mounting. That
is the check the previous commit open-coded around open_image; use the
library API instead so there is one implementation of it, shared with
composefs-setup-root.
composefs-rs also records whether a repository's fs-verity requirement
was detected from meta.json or chosen by the caller, and an explicit
choice is final for the handle. The initramfs sets
`IntegrityPolicy::Explicit(Enabled)` for a strict `composefs=` digest
and `Explicit(Disabled)` for one with the `?` marker, then mounts by
digest either way. With the marker a missing fs-verity digest is
tolerated, but one that can be measured still has to match.
The name-based mount() no longer runs in the initramfs, so images/refs/
is never consulted for a boot, with or without the marker. An image
that only exists under images/refs/<digest> is now reported as not
found rather than as a digest mismatch, so the boot moves on to the
next command line candidate the same way it does for a missing image.
`Repository::set_insecure` now returns a `Result`, so the remaining
callers propagate it. They all run on a freshly opened repository,
where the detected policy may still be replaced, so their behavior is
unchanged.
The booted verity test lists each case's expected result in a table
per mode, matches on the typed CompareVerityError::DigestMismatch
rather than on the message, and gains a case where images/<digest> is
repointed at another verified image, which both modes must reject as a
digest mismatch.
Bump composefs-ctl to 0.10.0, the release that carries these APIs
(composefs/composefs-rs#439).
Generated-by: AI
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>1 parent 2c6e47a commit 00574d5
8 files changed
Lines changed: 261 additions & 186 deletions
File tree
- crates
- initramfs/src
- lib/src
- bootc_composefs
- store
- tests-integration
- src/booted
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
0 commit comments