summaryrefslogtreecommitdiffstats
path: root/libvirt-override-virDomainSnapshot.py
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2013-01-23 12:14:57 +0100
committerJiri Denemark <jdenemar@redhat.com>2013-01-24 21:24:30 +0100
commita2e333640d28df8d31d8ae03d13e5dbf11380381 (patch)
tree423a53c485e3e84b7f086200087321668396c03e /libvirt-override-virDomainSnapshot.py
parentd9a4428e4485719d2945d0e6b35e9efc412d2a2e (diff)
downloadlibvirt-python-split-a2e333640d28df8d31d8ae03d13e5dbf11380381.tar.gz
libvirt-python-split-a2e333640d28df8d31d8ae03d13e5dbf11380381.tar.xz
libvirt-python-split-a2e333640d28df8d31d8ae03d13e5dbf11380381.zip
python: Fix bindings for virDomainSnapshotGet{Domain,Connect}v1.0.2-rc2v1.0.2CVE-2013-0170
https://bugzilla.redhat.com/show_bug.cgi?id=895882 virDomainSnapshot.getDomain() and virDomainSnapshot.getConnect() wrappers around virDomainSnapshotGet{Domain,Connect} were not supposed to be ever implemented. The class should contain proper domain() and connect() accessors that fetch python objects stored internally within the class. While domain() was already provided, connect() was missing. This patch adds connect() method to virDomainSnapshot class and reimplements getDomain() and getConnect() methods as aliases to domain() and connect() for backward compatibility.
Diffstat (limited to 'libvirt-override-virDomainSnapshot.py')
-rw-r--r--libvirt-override-virDomainSnapshot.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/libvirt-override-virDomainSnapshot.py b/libvirt-override-virDomainSnapshot.py
index 3da7bfd..bf708a5 100644
--- a/libvirt-override-virDomainSnapshot.py
+++ b/libvirt-override-virDomainSnapshot.py
@@ -1,3 +1,11 @@
+ def getConnect(self):
+ """Get the connection that owns the domain that a snapshot was created for"""
+ return self.connect()
+
+ def getDomain(self):
+ """Get the domain that a snapshot was created for"""
+ return self.domain()
+
def listAllChildren(self, flags):
"""List all child snapshots and returns a list of snapshot objects"""
ret = libvirtmod.virDomainSnapshotListAllChildren(self._o, flags)