1. 04 2月, 2013 16 次提交
  2. 02 2月, 2013 4 次提交
    • M
      e7aa207c
    • M
      esx: Simplify esxPrivate pointer handling in esxOpen · ee47d236
      Matthias Bolte 提交于
      Commit 4445e16b changed the signature
      of esxConnectToHost and esxConnectToVCenter by replacing the esxPrivate
      pointer with virConnectPtr. The esxPrivate pointer was then retrieved
      again from virConnectPtr's privateData. This resulted in a NULL pointer
      dereference, because the privateData pointer was not yet initialized at
      the point where esxConnectToHost and esxConnectToVCenter are called.
      
      This was fixed in commit b126715a that
      moved the initialization of privateData before the problematic calls.
      
      Simplify the logic by making the call to esxFreePrivate unconditional and
      changing esxConnectToHost and esxConnectToVCenter back to take a esxPrivate
      pointer directly. This allows to assign esxPrivate to the virConnectPtr's
      privateData pointer as one of the last steps in esxOpen making it more
      obvious that it is not initialized during the earlier steps of esxOpen.
      ee47d236
    • E
      docs: don't ignore virEvent API · b2aa03b3
      Eric Blake 提交于
      Commit 6094ad7b (0.9.3 release) promoted several functions from
      internal to public, but forgot to fix the documentation generator
      to provide details about those functions.
      
      For an example of what this fixes, look at:
      file:///path/to/libvirt/docs/html/libvirt-libvirt.html#virEventAddHandle
      before and after the patch.
      
      * docs/apibuild.py (ignored_functions): Don't ignore functions
      that were turned into official API.
      * src/util/virevent.c: Fix comments to pass through parser.
      b2aa03b3
    • E
      maint: update to latest gnulib · d09949e2
      Eric Blake 提交于
      CVE-2013-0242 in glibc's regex() can cause a DoS in any daemon
      that runs a regex search on user input while in a multibyte locale.
      I'm not sure how hard it would be to trigger such a setup for
      libvirtd, but rather than risk things, we can avoid the issue:
      gnulib has worked around the problem, and by updating to the latest
      gnulib, we can avoid the bug even on platforms where glibc has yet
      to be patched.
      
      * .gnulib: Update to latest, for various fixes, including regex.
      * bootstrap: Resync from upstream.
      d09949e2
  3. 01 2月, 2013 9 次提交
    • C
      docs: use div, not table, for notices on opaque types · 52b1fd25
      Claudio Bley 提交于
      It's simpler to render and it prevents wrapping the line too early
      because of the table spacing, border et cetera.
      52b1fd25
    • C
      docs: abort when missing return or argument documentation · 7d3cef8a
      Claudio Bley 提交于
      When a function has no associated information to one of its
      arguments or its return type we report it and stop with an error.
      7d3cef8a
    • C
    • C
      91ecc7dd
    • C
      libvirt.h.in: fix documentation for virConnectDomainEventBlockJobCallback · a7defab6
      Claudio Bley 提交于
      In commit 3ac26e26 parameter "path" was
      renamed to "disk" but this change was not reflected in the documentation.
      
      Additionally, documentation of the "opaque" parameter was missing.
      a7defab6
    • C
      4247e4e5
    • S
      Add support for QEMU -add-fd support detection · 410b335d
      Stefan Berger 提交于
      Add support for QEMU -add-fd command line parameter detection.
      This intentionally rejects qemu 1.2, where 'add-fd' QMP did
      not allow full control of set ids, and where there was no command
      line counterpart, but accepts qemu 1.3.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      410b335d
    • E
      qemu: expose qemu 1.3 add-fd monitor command · 7b2c5893
      Eric Blake 提交于
      Add entry points for calling the qemu 'add-fd' and 'remove-fd'
      monitor commands.  There is no entry point for 'query-fdsets';
      the assumption is that a developer can use
       virsh qemu-monitor-command domain '{"execute":"query-fdsets"}'
      when debugging issues, and that meanwhile, libvirt is responsible
      enough to remember what fds it associated with what fdsets.
      Likewise, on the 'add-fd' command, it is assumed that libvirt
      will always pass a set id, rather than letting qemu autogenerate
      the next available id number.
      
      * src/qemu/qemu_monitor.c (qemuMonitorAddFd, qemuMonitorRemoveFd):
      New functions.
      * src/qemu/qemu_monitor.h (qemuMonitorAddFd, qemuMonitorRemoveFd):
      New prototypes.
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONAddFd)
      (qemuMonitorJSONRemoveFd): New functions.
      * src/qemu/qemu_monitor_json.h (qemuMonitorJSONAddFd)
      (qemuMonitorJSONRemoveFd): New prototypes.
      7b2c5893
    • E
      tests: add a comment about our fake qmp · 949ebc30
      Eric Blake 提交于
      While testing QMP, I used a simple qemu session of
      'qemu-kvm -M none -nodefaults -nographic -qmp stdio'
      for some experiments.  But it took me far too long to remember
      the magic invocation to unlock QMP into accepting normal commands.
      While I was able to grep libvirt sources and easily find where
      libvirt expects the normal "QMP" greeting, I could not find the
      proper reply to that greeting nearby.
      
      Reading the testsuite didn't help either, since there we don't
      emulate the mandatory handshake.  But since my grep hit the
      testsuite, adding a bit of documentation will make it much easier
      to jog my memory in the future.
      
      * tests/qemumonitortestutils.c (QEMU_JSON_GREETING): Mention that
      the normal counterpart reply is skipped.
      949ebc30
  4. 31 1月, 2013 5 次提交
    • J
      spec: Avoid using makeinstall relic · d45066a5
      Jiri Denemark 提交于
      The macro was made to help installing broken packages that did not use
      DESTDIR correctly by overriding individual path variables (prefix,
      sysconfdir, ...). Newer rpm provides fixed make_install macro that calls
      make install with just the correct DESTDIR, however it is not available
      everywhere (e.g., RHEL 5 does not have it). On the other hand the
      make_install macro is simple and straightforward enough for us to use
      its expansion directly.
      d45066a5
    • S
      complete virterror->virerror name change · a6b8bae5
      Serge Hallyn 提交于
      Without these two string changes in generator.py, the
      virGetLastError wrapper does not get created in
      /usr/share/pyshared/libvirt.py.  Noticed when running
      tests with virt-install.
      Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com>
      a6b8bae5
    • J
      tests: Don't build securityselinuxlabeltest without qemu · d6c85970
      Jiri Denemark 提交于
      Sources for securityselinuxlabeltest are only defined if qemu driver is
      enabled so we should not try to build the test if qemu driver is
      disabled.
      d6c85970
    • C
      apibuild.py: fix TypeError raised in except clause · 9170ba15
      Claudio Bley 提交于
      When an exception happened inside the try clause in serialize_function,
      a new exception was raised in the except clause subsequently:
      
      Traceback (most recent call last):
        File "./apibuild.py", line 2529, in <module>
          rebuild("libvirt")
        File "./apibuild.py", line 2513, in rebuild
          builder.serialize()
        File "./apibuild.py", line 2467, in serialize
          self.serialize_function(output, function)
        File "./apibuild.py", line 2208, in serialize_function
          self.warning("Failed to save function %s info: " % name, `id.info`)
      TypeError: warning() takes exactly 2 arguments (3 given)
      
      Use the correct number of arguments for self.warning and print the
      original exception to stderr.
      9170ba15
    • J
      Enforce return check on virAsprintf() calls · 46b1d8cf
      John Ferlan 提交于
      Way back when I started making changes for Coverity messages my first set
      were to a bunch of CHECKED_RETURN errors.  In particular virAsprintf() had
      a few callers that Coverity noted didn't check their return (although some
      did check if the buffer being printed to was NULL or not).
      
      It was suggested at the time as a further patch an ATTRIBUTE_RETURN_CHECK
      should be added to virAsprintf(), see:
      
      https://www.redhat.com/archives/libvir-list/2013-January/msg00120.html
      
      This patch does that and fixes a few more instances not found by Coverity
      that failed the check.
      46b1d8cf
  5. 30 1月, 2013 6 次提交