1. 21 5月, 2010 4 次提交
    • C
      Domain snapshot RNG and tests. · 54971d91
      Chris Lalancette 提交于
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      54971d91
    • C
      Fix up the python bindings for snapshotting. · 8749256d
      Chris Lalancette 提交于
      This involved a few fixes.  To start with,
      an virDomainSnapshot object is really tied to a
      domain, not a connection, so we have to generate
      a slightly different object so that we can get
      at self._dom for the object.
      
      Next, we had to "dummy" up an override piece of
      XML with a bogus argument that the function doesn't
      actually take.  That's so that the generator places
      virDomainRevertToSnapshot underneath the correct
      class (namely, the virDomain class).
      
      Finally, we had to hand-implement the
      virDomainRevertToSnapshot implementation, ignoring the
      bogus pointer we are being passed.
      
      With all of this in place, I was able to successfully
      take a snapshot and revert to it using only the
      Python bindings.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      8749256d
    • J
      qemu_conf.c: also recognize new first line of qemu -help output · 20beb0c0
      Jim Meyering 提交于
      * src/qemu/qemu_conf.c (QEMU_VERSION_STR_1, QEMU_VERSION_STR_2):
      Define these instead of...
      (QEMU_VERSION_STR): ... this.  Remove definition.
      (qemudParseHelpStr): Check first for the new, shorter prefix,
      "QEMU emulator version", and then for the old one,
      "QEMU PC emulator version" when trying to parse the version number.
      Based on a patch by Chris Wright.
      20beb0c0
    • J
      lxc_controller.c: don't ignore failed "accept" · 1f6fc519
      Jim Meyering 提交于
      * src/lxc/lxc_controller.c (ignorable_epoll_accept_errno): New function.
      (lxcControllerMain): Handle a failed accept carefully:
      most errno values indicate legitimate failure and must be fatal.
      However, ignore a special case: that in which an incoming client quits
      between the poll() indicating its presence, and our accept() which
      is trying to process it.
      1f6fc519
  2. 20 5月, 2010 13 次提交
  3. 19 5月, 2010 19 次提交
  4. 18 5月, 2010 4 次提交
    • J
      ebiptablesWriteToTempFile: don't close a negative file descriptor · 0058184c
      Jim Meyering 提交于
      * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesWriteToTempFile):
      Skip the close if "fd" is negative.
      0058184c
    • D
      Protect against NULL pointer flaws in monitor usage · 31e29fe5
      Daniel P. Berrange 提交于
      History has shown that there are frequent bugs in the QEMU driver
      code leading to the monitor being invoked with a NULL pointer.
      Although the QEMU driver code should always report an error in
      this case before invoking the monitor, as a safety net put in a
      generic check in the monitor code entry points.
      
      * src/qemu/qemu_monitor.c: Safety net to check for NULL monitor
        object
      31e29fe5
    • D
      Fix multiple potential NULL pointer references in monitor usage · c4b2a939
      Daniel P. Berrange 提交于
      Any method which intends to invoke a monitor command must have
      a check for virDomainObjIsActive() before using the monitor to
      ensure that priv->mon != NULL.
      
      There is one subtle edge case in this though. If a method invokes
      multiple monitor commands, and calls qemuDomainObjExitMonitor()
      in between two of these commands then there is no guarentee that
      priv->mon != NULL anymore. This is because the QEMU process may
      exit or die at any time, and because qemuDomainObjEnterMonitor()
      releases the lock on virDomainObj, it is possible for the background
      thread to close the monitor handle and thus qemuDomainObjExitMonitor
      will release the last reference allowing priv->mon to become NULL.
      
      This affects several methods, most notably migration but also some
      hotplug methods. This patch takes a variety of approaches to solve
      the problem, depending on the particular usage scenario. Generally
      though it suffices to add an extra virDomainObjIsActive() check
      if qemuDomainObjExitMonitor() was called during the method.
      
      * src/qemu/qemu_driver.c: Fix multiple potential NULL pointer flaws
        in usage of the monitor
      c4b2a939
    • J
      maint: add more free-like functions to the list and deal with fallout · a986892e
      Jim Meyering 提交于
      * cfg.mk (useless_free_options): Add many vir*Free* function names,
      and then remove the useless if-before-free tests exposed by running
      make syntax-check.
      * src/conf/interface_conf.c (virInterfaceDefFree): Remove useless "if".
      (virInterfaceAssignDef): Likewise.
      * src/conf/network_conf.c (virNetworkAssignDef): Likewise.
      * src/conf/storage_conf.c (virStoragePoolObjAssignDef): Likewise.
      * src/node_device/node_device_hal.c (dev_create): Likewise.
      * src/security/virt-aa-helper.c (vahDeinit): Likewise.
      * src/test/test_driver.c (testNodeDeviceCreateXML): Likewise.
      * src/util/conf.c (virConfSetValue): Likewise.
      a986892e