Allow virDomain(SG)etGuestVcpus on read-write connection only

Guest agent interaction is considered privileged.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1349272
This commit is contained in:
Peter Krempa 2016-06-23 09:02:29 +02:00
parent 21b56a6055
commit dfeb19ff60
1 changed files with 4 additions and 0 deletions

View File

@ -11873,6 +11873,8 @@ virDomainGetGuestVcpus(virDomainPtr domain,
virResetLastError();
virCheckDomainReturn(domain, -1);
virCheckReadOnlyGoto(domain->conn->flags, error);
virCheckNonNullArgGoto(params, error);
virCheckNonNullArgGoto(nparams, error);
@ -11929,6 +11931,8 @@ virDomainSetGuestVcpus(virDomainPtr domain,
virResetLastError();
virCheckDomainReturn(domain, -1);
virCheckReadOnlyGoto(domain->conn->flags, error);
virCheckNonNullArgGoto(cpumap, error);
if (domain->conn->driver->domainSetGuestVcpus) {