This function will change the guest name, we shouldn't
allow the readonly user do this.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/libvirt-domain.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 9065dab..9314f85 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -8796,6 +8796,7 @@ virDomainRename(virDomainPtr dom,
virResetLastError();
virCheckDomainReturn(dom, -1);
virCheckNonNullArgGoto(new_name, error);
+ virCheckReadOnlyGoto(dom->conn->flags, error);
if (dom->conn->driver->domainRename) {
int ret = dom->conn->driver->domainRename(dom, new_name, flags);
--
1.8.3.1