1. 21 12月, 2012 11 次提交
  2. 15 12月, 2012 1 次提交
    • R
      Socket identity support for FreeBSD. · 0c94357f
      Roman Bogorodskiy 提交于
      This adds an implementation of virNetSocketGetUNIXIdentity()
      using LOCAL_PEERCRED socket option and xucred struct, defined
      in <sys/ucred.h> on systems that have it.
      0c94357f
  3. 05 12月, 2012 1 次提交
    • E
      rpc: fix build failure with older dbus · 2215befc
      Eric Blake 提交于
      RHEL 6.3 uses dbus-devel-1.2.24, which lacked support for the
      DBUS_TYPE_UNIX_FD define (contrast with Fedora 18 using 1.6.8).
      But since it is an older dbus, it also lacks support for shutdown
      inhibitions as provided by newer systemd.
      
      Compilation failure introduced in commit 31330926.
      
      * src/rpc/virnetserver.c (virNetServerAddShutdownInhibition):
      Compile out if dbus is too old.
      2215befc
  4. 04 12月, 2012 2 次提交
  5. 03 12月, 2012 1 次提交
  6. 01 12月, 2012 1 次提交
  7. 30 11月, 2012 1 次提交
    • J
      rpc: don't destroy xdr before creating it in virNetMessageEncodeHeader · 6e1fc355
      Ján Tomko 提交于
      On OOM, xdr_destroy got called even though it wasn't created yet.
      
      Found by coverity:
      Error: UNINIT (CWE-457):
          libvirt-0.10.2/src/rpc/virnetmessage.c:214: var_decl: Declaring
          variable "xdr" without initializer.
          libvirt-0.10.2/src/rpc/virnetmessage.c:219: cond_true: Condition
          "virReallocN(&msg->buffer, 1UL /* sizeof (*msg->buffer) */,
          msg->bufferLength) < 0", taking true branch
          libvirt-0.10.2/src/rpc/virnetmessage.c:221: goto: Jumping to label
          "cleanup"
          libvirt-0.10.2/src/rpc/virnetmessage.c:257: label: Reached label
          "cleanup"
          libvirt-0.10.2/src/rpc/virnetmessage.c:258: uninit_use: Using
          uninitialized value "xdr.x_ops".
      6e1fc355
  8. 29 11月, 2012 1 次提交
  9. 28 11月, 2012 1 次提交
  10. 02 11月, 2012 1 次提交
  11. 27 10月, 2012 2 次提交
    • E
      build: silence compiler warning about signedness · 60f54f61
      Eric Blake 提交于
      Commit 246143b6 fixed a warning on older gcc, but caused a warning
      on newer gcc.
      
      ../../src/rpc/virnetserverservice.c: In function 'virNetServerServiceNewPostExecRestart':
      ../../src/rpc/virnetserverservice.c:277:41: error: pointer targets in passing argument 3 of 'virJSONValueObjectGetNumberUint' differ in signedness [-Werror=pointer-sign]
      
      * src/rpc/virnetserverservice.c: Use correct types.
      60f54f61
    • E
      build: fix type-punning bug · 246143b6
      Eric Blake 提交于
      With older gcc and 64-bit size_t, the compiler issues a real warning:
      rpc/virnetserverservice.c:277: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      
      Introduced in commit 0cc79255.  Depending on machine endianness,
      this warning represents a real bug that could mis-interpret the
      value by a factor of 2^32.  I don't know why I couldn't get newer
      gcc to report the same warning message.
      
      * src/rpc/virnetserverservice.c
      (virNetServerServiceNewPostExecRestart): Use temporary instead.
      246143b6
  12. 16 10月, 2012 4 次提交
  13. 12 10月, 2012 1 次提交
  14. 26 9月, 2012 3 次提交
  15. 21 9月, 2012 1 次提交
  16. 18 9月, 2012 1 次提交
    • E
      blockjob: add blockcommit support to rpc · 85edb0c8
      Eric Blake 提交于
      Relatively straightforward.  Our decision to make block job
      speed a long keeps haunting us on new API.
      
      * src/remote/remote_protocol.x (remote_domain_block_commit_args):
      New struct.
      * src/remote/remote_driver.c (remote_driver): Enable it.
      * src/remote_protocol-structs: Regenerate.
      * src/rpc/gendispatch.pl (long_legacy): Exempt another bandwidth.
      85edb0c8
  17. 17 9月, 2012 1 次提交
    • O
      node_memory: Wire up the RPC protocol · 00792722
      Osier Yang 提交于
      * src/rpc/gendispatch.pl: (virNodeSetMemoryParameters is the
        the special one which needs a connection object as the first
        argument, improve the generator to support it).
      * daemon/remote.c: (Implement the server side handler for
        virDomainGetMemoryParameters)
      * src/remote/remote_driver.c: (Implement the client side handler
        for virDomainGetMemoryParameters)
      * src/remote/remote_protocol.x: (New RPC procedures for the two
        new APIs and structs to represent the args and ret for it)
      * src/remote_protocol-structs: Likewise
      00792722
  18. 14 9月, 2012 1 次提交
    • M
      security: Fix libvirtd crash possibility · b7ff9e69
      Martin Kletzander 提交于
      Fix for CVE-2012-4423.
      
      When generating RPC protocol messages, it's strictly needed to have a
      continuous line of numbers or RPC messages. However in case anyone
      tries backporting some functionality and will skip a number, there is
      a possibility to make the daemon segfault with newer virsh (version of
      the library, rpc call, etc.) even unintentionally.
      
      The problem is that the skipped numbers will get func filled with
      NULLs, but there is no check whether these are set before the daemon
      tries to run them. This patch very simply enhances one check and fixes
      that.
      b7ff9e69
  19. 13 9月, 2012 1 次提交
    • E
      maint: fix missing spaces in message · 2387aa26
      Eric Blake 提交于
      I got an off-list report about a bad diagnostic:
      Target network card mac 52:54:00:49:07:ccdoes not match source 52:54:00:49:07:b8
      
      True to form, I've added a syntax check rule to prevent it
      from recurring, and found several other offenders.
      
      * cfg.mk (sc_require_whitespace_in_translation): New rule.
      * src/conf/domain_conf.c (virDomainNetDefCheckABIStability): Add
      space.
      * src/esx/esx_util.c (esxUtil_ParseUri): Likewise.
      * src/qemu/qemu_command.c (qemuCollectPCIAddress): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSetMetadata)
      (qemuDomainGetMetadata): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeNetBridge): Likewise.
      * src/rpc/virnettlscontext.c
      (virNetTLSContextCheckCertDNWhitelist): Likewise.
      * src/vmware/vmware_driver.c (vmwareDomainResume): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives):
      Avoid false negatives.
      * tools/virsh-domain.c (info_save_image_dumpxml): Reword.
      Based on a report by Luwen Su.
      2387aa26
  20. 10 9月, 2012 1 次提交
    • C
      Fix unwanted closing of libvirt client connection · 164c03d3
      Christophe Fergeau 提交于
      e5a1bee0 introduced a regression in Boxes: when Boxes is left idle
      (it's still doing some libvirt calls in the background), the
      libvirt connection gets closed after a few minutes. What happens is
      that this code in virNetClientIOHandleOutput gets triggered:
      
      if (!thecall)
          return -1; /* Shouldn't happen, but you never know... */
      
      and after the changes in e5a1bee0, this causes the libvirt connection
      to be closed.
      
      Upon further investigation, what happens is that
      virNetClientIOHandleOutput is called from gvir_event_handle_dispatch
      in libvirt-glib, which is triggered because the client fd became
      writable. However, between the times gvir_event_handle_dispatch
      is called, and the time the client lock is grabbed and
      virNetClientIOHandleOutput is called, another thread runs and
      completes the current call. 'thecall' is then NULL when the first
      thread gets to run virNetClientIOHandleOutput.
      
      After describing this situation on IRC, danpb suggested this:
      
      11:37 < danpb> In that case I think the correct thing would be to change
                     'return -1' above to 'return 0' since that's not actually an
                     error - its a rare, but expected event
      
      which is what this patch is doing. I've tested it against master
      libvirt, and I didn't get disconnected in ~10 minutes while this
      happens in less than 5 minutes without this patch.
      164c03d3
  21. 27 8月, 2012 1 次提交
  22. 23 8月, 2012 1 次提交
  23. 22 8月, 2012 1 次提交
    • P
      client: Change default location of known_hosts file for libssh2 layer · 225f2807
      Peter Krempa 提交于
      Unfortunately libssh2 doesn't support all types of host keys that can be
      saved in the known_hosts file. Also it does not report that parsing of
      the file failed. This results into truncated known_hosts files where the
      standard client stores keys also in other formats (eg.
      ecdsa-sha2-nistp256).
      
      This patch changes the default location of the known_hosts file into the
      libvirt private configuration directory, where it will be only written
      by the libssh2 layer itself. This prevents trashing user's known_host
      file.
      225f2807