mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
domain_cgroup: Fix a condition in virDomainCgroupConnectCgroup()
While parts of QEMU's CGroup code were moved under hypervisor
agnostic location (src/hypervisor/) a typo sneaked in. The
inspiration for virDomainCgroupConnectCgroup() comes from
qemuConnectCgroup(). The former is called upon reconnecting to a
running domain (after daemon restart). While the latter returned
early if the daemon was running unprivileged, the former returns
early if the daemon runs privileged. This is obviously wrong,
because root can set up CGroups.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2075765
Fixes: 788e2b58cb
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
136b821f18
commit
eac8de54a6
@ -485,7 +485,7 @@ virDomainCgroupConnectCgroup(const char *prefix,
|
|||||||
bool privileged,
|
bool privileged,
|
||||||
char *machineName)
|
char *machineName)
|
||||||
{
|
{
|
||||||
if (privileged)
|
if (!privileged)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!virCgroupAvailable())
|
if (!virCgroupAvailable())
|
||||||
|
Loading…
Reference in New Issue
Block a user