Re: [PATCH] conf: Reject invalid device's <seclabel relabel='yes'/> with no <label/>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Monday in 2023, Michal Privoznik wrote:
We allow (some) domain devices to have a different <seclabel/>
than the top level domain one (this is mostly to allow access to
a resource for multiple domains). Now, we do couple of sanity
checks for such <seclabel/>, e.g. when the <label/> is specified,
but '@relabel' is set to no. But what we are missing is the
opposite: then '@relabel' is set, but no <label/> was provided.


s/then/if/?

Our schema already denies such combination. Make our parser
behave the same.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2160356
Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
src/conf/domain_conf.c                        | 14 +++++++-
.../seclabel-device-relabel-invalid.err       |  1 +
.../seclabel-device-relabel-invalid.xml       | 35 +++++++++++++++++++
tests/qemuxml2argvtest.c                      |  1 +
4 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/seclabel-device-relabel-invalid.err
create mode 100644 tests/qemuxml2argvdata/seclabel-device-relabel-invalid.xml


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux