mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 04:55:18 +00:00
qemu: caps: Don't try to ask for CAP_DAC_OVERRIDE if non-root
It will not work. This breaks qemu capabilities probing as a user. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
41d37d31b3
commit
620d9dd598
@ -4524,7 +4524,8 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
|
||||
#if WITH_CAPNG
|
||||
/* QEMU might run into permission issues, e.g. /dev/sev (0600), override
|
||||
* them just for the purpose of probing */
|
||||
virCommandAllowCap(cmd->cmd, CAP_DAC_OVERRIDE);
|
||||
if (geteuid() == 0)
|
||||
virCommandAllowCap(cmd->cmd, CAP_DAC_OVERRIDE);
|
||||
#endif
|
||||
|
||||
virCommandSetGID(cmd->cmd, cmd->runGid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user