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

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

 



Guest agent interaction is considered privileged.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1349272
---
 src/libvirt-domain.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 508520e..2ca054a 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -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) {
-- 
2.8.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]