Don't allow readonly connections to dump secure xml.

This commit is contained in:
Cole Robinson 2009-03-16 17:21:12 +00:00
parent 2068f2f5a3
commit b68a19be0f
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,7 @@
Mon Mar 16 13:17:05 EDT 2009 Cole Robinson <crobinso@redhat.com>
* src/libvirt.c: Don't allow readonly connections to dump secure xml.
Mon Mar 16 13:15:11 EDT 2009 Cole Robinson <crobinso@redhat.com>
* src/qemu_driver.c: Initialize security driver after config parsing

View File

@ -2619,6 +2619,12 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
conn = domain->conn;
if ((conn->flags & VIR_CONNECT_RO) && (flags & VIR_DOMAIN_XML_SECURE)) {
virLibConnError(conn, VIR_ERR_OPERATION_DENIED,
_("virDomainGetXMLDesc with secure flag"));
goto error;
}
if (conn->driver->domainDumpXML) {
char *ret;
ret = conn->driver->domainDumpXML (domain, flags);