提交 2b3fb38f 编写于 作者: L Luyao Huang 提交者: John Ferlan

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: NLuyao Huang <lhuang@redhat.com>
上级 b2da1d45
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册