mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-12 21:57:27 +03:00
sysext: refuse empty release ID to avoid triggering assertion
Otherwise, the assertion in extension_release_validate() will be triggered. (cherry picked from commit 30e29edf4c0bb025aa7dc03c415b727fddf996ac)
This commit is contained in:
parent
684585719b
commit
6100e1dded
@ -483,6 +483,10 @@ static int merge_subprocess(Hashmap *images, const char *workspace) {
|
||||
"SYSEXT_LEVEL", &host_os_release_sysext_level);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to acquire 'os-release' data of OS tree '%s': %m", empty_to_root(arg_root));
|
||||
if (isempty(host_os_release_id))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"'ID' field not found or empty in 'os-release' data of OS tree '%s': %m",
|
||||
empty_to_root(arg_root));
|
||||
|
||||
/* Let's now mount all images */
|
||||
HASHMAP_FOREACH(img, images) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user