libvirt/src/qemu
Michal Privoznik 5ac2439a83 qemu_process: Release domain seclabel later in qemuProcessStop()
Some secdrivers (typically SELinux driver) generate unique
dynamic seclabel for each domain (unless a static one is
requested in domain XML). This is achieved by calling
qemuSecurityGenLabel() from qemuProcessPrepareDomain() which
allocates unique seclabel and stores it in domain def->seclabels.
The counterpart is qemuSecurityReleaseLabel() which releases the
label and removes it from def->seclabels. Problem is, that with
current code the qemuProcessStop() may still want to use the
seclabel after it was released, e.g. when it wants to restore the
label of a disk mirror.

What is happening now, is that in qemuProcessStop() the
qemuSecurityReleaseLabel() is called, which removes the SELinux
seclabel from def->seclabels, yada yada yada and eventually
qemuSecurityRestoreImageLabel() is called. This bubbles down to
virSecuritySELinuxRestoreImageLabelSingle() which find no SELinux
seclabel (using virDomainDefGetSecurityLabelDef()) and this
returns early doing nothing.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1751664
Fixes: 8fa0374c5b
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-06 13:29:09 +01:00
..
EVENTHANDLERS.txt
libvirt_qemu_probes.d
libvirtd_qemu.aug qemu: conf: Introduce "migrate_tls_force" qemu.conf option 2020-11-24 17:59:26 +01:00
meson.build meson: drop use of .path() for python args 2020-11-09 16:32:55 +00:00
MIGRATION.txt
qemu_agent.c qemu: Drop has_ccw_address from _qemuAgentDiskAddress 2021-01-04 14:53:08 +01:00
qemu_agent.h qemu: Drop has_ccw_address from _qemuAgentDiskAddress 2021-01-04 14:53:08 +01:00
qemu_alias.c qemu: enable support for ESP SCSI controller family 2020-11-20 12:09:51 +00:00
qemu_alias.h
qemu_backup.c qemu: backup: Properly delete temporary bitmap after push-mode incremental backup 2021-01-06 09:25:12 +01:00
qemu_backup.h util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemu_block.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemu_block.h util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemu_blockjob.c util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemu_blockjob.h
qemu_capabilities.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemu_capabilities.h qemu: add capabilities for the three ESP family SCSI controllers 2020-11-20 12:09:51 +00:00
qemu_capspriv.h
qemu_cgroup.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemu_cgroup.h
qemu_checkpoint.c virDomainCheckpointRedefineCommit: Don't check ABI of definition in checkpoint 2020-12-04 16:15:03 +01:00
qemu_checkpoint.h qemu: rename: support renaming checkpoints directory 2020-11-13 14:49:50 +03:00
qemu_command.c qemu: Don't prealloc mem for real NVDIMMs 2021-01-05 13:19:22 +01:00
qemu_command.h qemu_command: Move dimm into qemuBuildDeviceAddressStr() 2020-12-04 16:24:19 +01:00
qemu_conf.c qemu: Don't cache NUMA caps 2020-12-07 11:32:40 +01:00
qemu_conf.h qemu: Don't cache NUMA caps 2020-12-07 11:32:40 +01:00
qemu_dbus.c
qemu_dbus.h
qemu_domain_address.c qemu: remove redundant check for file length when determining PCIe vs. PCI 2020-12-12 21:18:46 -05:00
qemu_domain_address.h
qemu_domain.c domain_conf: move net device validation to domain_validate.c 2020-12-14 09:32:31 -03:00
qemu_domain.h qemuDomainGetStorageSourceByDevstr: Lookup also backup 'store' nodenames 2020-12-08 15:12:34 +01:00
qemu_domainjob.c
qemu_domainjob.h
qemu_driver.c qemu: Fix retval if ACL check fails in qemuNodeGetSecurityModel 2021-01-04 20:18:11 +01:00
qemu_driver.h
qemu_extdevice.c
qemu_extdevice.h
qemu_firmware.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemu_firmware.h
qemu_hostdev.c
qemu_hostdev.h
qemu_hotplug.c qemu: Properly handle setting of <iotune> for empty cdrom 2021-01-06 09:24:48 +01:00
qemu_hotplug.h
qemu_interface.c qemu: remove redundant code that adds "template" netdev name 2020-12-16 21:31:57 -05:00
qemu_interface.h
qemu_interop_config.c src: add missing headers to various files 2021-01-06 13:15:17 +01:00
qemu_interop_config.h
qemu_migration_cookie.c qemu_migration_cookie: Make cookie parsing robust against missing domain job 2020-11-09 12:25:49 +01:00
qemu_migration_cookie.h qemu_migration_cookie: Export qemuMigrationCookieXMLFormat for tests 2020-11-09 12:25:49 +01:00
qemu_migration_params.c
qemu_migration_params.h
qemu_migration_paramspriv.h
qemu_migration.c virstoragefile: move virStorageFileIsClusterFS into virfile 2021-01-06 13:15:17 +01:00
qemu_migration.h
qemu_monitor_json.c qemuMonitorBlockJobInfo: Store 'ready' and 'ready_present' separately 2020-12-07 10:15:00 +01:00
qemu_monitor_json.h qemu: Pass / fill niothreads for qemuMonitorGetIOThreads 2020-12-03 17:06:07 +01:00
qemu_monitor_priv.h
qemu_monitor_text.c
qemu_monitor_text.h
qemu_monitor.c qemu: monitor: Remove unused qemuMonitorGetBlockJobInfo 2020-12-07 10:15:00 +01:00
qemu_monitor.h qemu: monitor: Remove unused qemuMonitorGetBlockJobInfo 2020-12-07 10:15:00 +01:00
qemu_namespace.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemu_namespace.h
qemu_process.c qemu_process: Release domain seclabel later in qemuProcessStop() 2021-01-06 13:29:09 +01:00
qemu_process.h
qemu_processpriv.h
qemu_qapi.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemu_qapi.h util: hash: Retire 'virHashTable' in favor of 'GHashTable' 2020-11-06 10:40:51 +01:00
qemu_saveimage.c
qemu_saveimage.h
qemu_security.c
qemu_security.h
qemu_shim.c src: add missing headers to various files 2021-01-06 13:15:17 +01:00
qemu_slirp.c
qemu_slirp.h
qemu_snapshot.c qemu: snapshot: Write metadata of previously-'current' snapshot on update 2020-11-24 17:59:26 +01:00
qemu_snapshot.h
qemu_tpm.c conf: Add support for keeping TPM emulator state 2021-01-06 11:44:12 +01:00
qemu_tpm.h
qemu_validate.c qemu: Relax validation for mem->access if guest has no NUMA 2020-12-14 14:00:25 +01:00
qemu_validate.h virDomainDefValidate: Add per-run 'opaque' data 2020-12-09 09:33:47 +01:00
qemu_vhost_user_gpu.c
qemu_vhost_user_gpu.h
qemu_vhost_user.c lib: Replace VIR_AUTOSTRINGLIST with GStrv 2020-12-02 15:43:07 +01:00
qemu_vhost_user.h
qemu_virtiofs.c
qemu_virtiofs.h
qemu.conf qemu: conf: Introduce "migrate_tls_force" qemu.conf option 2020-11-24 17:59:26 +01:00
test_libvirtd_qemu.aug.in qemu: conf: Introduce "migrate_tls_force" qemu.conf option 2020-11-24 17:59:26 +01:00
THREADS.txt
virtqemud.init.in configure: Provide OpenRC scripts for sub-daemons 2019-12-16 10:11:22 +01:00
virtqemud.service.in
virtqemud.sysconf