1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

discover-image: mount as read-only when extracting metadata

We don't need to modify the image, and the loopback device is already set to read-only.
This commit is contained in:
Luca Boccassi 2021-07-22 22:21:10 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 14f4b1b568
commit f6f4ec7951

View File

@ -1208,6 +1208,7 @@ int image_read_metadata(Image *i) {
DISSECT_IMAGE_GENERIC_ROOT | DISSECT_IMAGE_GENERIC_ROOT |
DISSECT_IMAGE_REQUIRE_ROOT | DISSECT_IMAGE_REQUIRE_ROOT |
DISSECT_IMAGE_RELAX_VAR_CHECK | DISSECT_IMAGE_RELAX_VAR_CHECK |
DISSECT_IMAGE_READ_ONLY |
DISSECT_IMAGE_USR_NO_ROOT, DISSECT_IMAGE_USR_NO_ROOT,
&m); &m);
if (r < 0) if (r < 0)