]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: never reject <disk> <seclabel relabel='no'> overrides
authorCole Robinson <crobinso@redhat.com>
Tue, 14 Oct 2025 17:41:45 +0000 (13:41 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 24 Oct 2025 18:38:38 +0000 (14:38 -0400)
commitf6ea64f18204069e91e18e8229951b012a7f6bff
treea91908281e5aee77c5bb2b8fd9309a0071803f61
parentbe638396f02003a1f8bb2a0b4b509a90bcccfe7e
conf: never reject <disk> <seclabel relabel='no'> overrides

Trying to disable <seclabel> for the whole <domain> and _also_
disable <seclabel> at the <disk> level will fail with:

  error: unsupported configuration: label overrides require relabeling to be enabled at the domain level

which seems wrong. Instead skip the validation when disk seclabel
has relabel='no', that config should always be valid.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/conf/domain_validate.c
tests/qemuxmlconfdata/seclabel-selinux-none-override.x86_64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/seclabel-selinux-none-override.x86_64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/seclabel-selinux-none-override.xml [new file with mode: 0644]
tests/qemuxmlconftest.c