mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 11:15:08 +00:00
Don't allow readonly connections to dump secure xml.
This commit is contained in:
parent
2068f2f5a3
commit
b68a19be0f
@ -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>
|
Mon Mar 16 13:15:11 EDT 2009 Cole Robinson <crobinso@redhat.com>
|
||||||
|
|
||||||
* src/qemu_driver.c: Initialize security driver after config parsing
|
* src/qemu_driver.c: Initialize security driver after config parsing
|
||||||
|
@ -2619,6 +2619,12 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
|
|||||||
|
|
||||||
conn = domain->conn;
|
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) {
|
if (conn->driver->domainDumpXML) {
|
||||||
char *ret;
|
char *ret;
|
||||||
ret = conn->driver->domainDumpXML (domain, flags);
|
ret = conn->driver->domainDumpXML (domain, flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user