diff --git a/src/core/namespace.c b/src/core/namespace.c index c549dcc96b..ecbd23833c 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -1151,6 +1151,8 @@ static int mount_image(const MountEntry *m, const char *root_directory) { NULL); if (r < 0) return log_debug_errno(r, "Failed to acquire 'os-release' data of OS tree '%s': %m", empty_to_root(root_directory)); + if (isempty(host_os_release_id)) + return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "'ID' field not found or empty in 'os-release' data of OS tree '%s': %m", empty_to_root(root_directory)); } r = verity_dissect_and_mount( diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 39a7f4c3f2..14519ead70 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -3534,9 +3534,9 @@ int verity_dissect_and_mount( /* If we got os-release values from the caller, then we need to match them with the image's * extension-release.d/ content. Return -EINVAL if there's any mismatch. * First, check the distro ID. If that matches, then check the new SYSEXT_LEVEL value if - * available, or else fallback to VERSION_ID. */ - if (required_host_os_release_id && - (required_host_os_release_version_id || required_host_os_release_sysext_level)) { + * available, or else fallback to VERSION_ID. If neither is present (eg: rolling release), + * then a simple match on the ID will be performed. */ + if (required_host_os_release_id) { _cleanup_strv_free_ char **extension_release = NULL; r = load_extension_release_pairs(dest, dissected_image->image_name, &extension_release);