[PATCH] Don't allow raneming domains to empty strings

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

 



It may cause unwanted behaviour (of course, is there any wanted one for
that case?) so we should rather disable the possibility of doing so.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1320893

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/libvirt-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 508520efd6c5..89a2d7efe972 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -8790,7 +8790,7 @@ virDomainRename(virDomainPtr dom,

     virResetLastError();
     virCheckDomainReturn(dom, -1);
-    virCheckNonNullArgGoto(new_name, error);
+    virCheckNonEmptyStringArgGoto(new_name, error);
     virCheckReadOnlyGoto(dom->conn->flags, error);

     if (dom->conn->driver->domainRename) {
-- 
2.9.0

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