mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
libvirt-domain: forbid use virDomainRename in readonly connection
This function will change the guest name, we shouldn't allow the readonly user do this. Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
b2da1d453f
commit
2b3fb38fab
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user