1. 30 6月, 2016 1 次提交
  2. 16 12月, 2015 3 次提交
    • E
      CVE-2015-5313: storage: don't allow '/' in filesystem volume names · 54be99a7
      Eric Blake 提交于
      The libvirt file system storage driver determines what file to
      act on by concatenating the pool location with the volume name.
      If a user is able to pick names like "../../../etc/passwd", then
      they can escape the bounds of the pool.  For that matter,
      virStoragePoolListVolumes() doesn't descend into subdirectories,
      so a user really shouldn't use a name with a slash.
      
      Normally, only privileged users can coerce libvirt into creating
      or opening existing files using the virStorageVol APIs; and such
      users already have full privilege to create any domain XML (so it
      is not an escalation of privilege).  But in the case of
      fine-grained ACLs, it is feasible that a user can be granted
      storage_vol:create but not domain:write, and it violates
      assumptions if such a user can abuse libvirt to access files
      outside of the storage pool.
      
      Therefore, prevent all use of volume names that contain "/",
      whether or not such a name is actually attempting to escape the
      pool.
      
      This changes things from:
      
      $ virsh vol-create-as default ../../../../../../etc/haha --capacity 128
      Vol ../../../../../../etc/haha created
      $ rm /etc/haha
      
      to:
      
      $ virsh vol-create-as default ../../../../../../etc/haha --capacity 128
      error: Failed to create vol ../../../../../../etc/haha
      error: Requested operation is not valid: volume name '../../../../../../etc/haha' cannot contain '/'
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 034e47c3)
      54be99a7
    • M
      util: Prepare URI formatting for libxml2 >= 2.9.2 · dc4df80f
      Martin Kletzander 提交于
      Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
      two slashes from the URI when there is no server part.  This is fixed
      with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
      application calls xmlSaveUri() on URI that xmlURIParse() parsed.  And
      that is not the case in virURIFormat().  virURIFormat() accepts
      virURIPtr that can be created without parsing it and we do that when we
      format network storage paths for gluster for example.  Even though
      virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
      structure right away.
      
      Since we want to format URIs as URIs and not absolute URIs or opaque
      URIs (see RFC 3986), we can specify that with a special hack thanks to
      commit beb7281055dbf0ed4d041022a67c6c5cfd126f25, by setting port to -1.
      
      This fixes qemuxml2argvtest test where the disk-drive-network-gluster
      case was failing.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      (cherry picked from commit 8f17d0ea)
      dc4df80f
    • D
      avoid using deprecated udev logging functions · e3b43a95
      Daniel P. Berrange 提交于
      In systemd >= 218, the udev_set_log_fn method has been marked
      deprecated and turned into a no-op. Nothing in the udev client
      library will print to stderr by default anymore, so we can
      just stop installing a logging hook for new enough udev.
      
      (cherry picked from commit a93a3b97)
      e3b43a95
  3. 03 9月, 2015 1 次提交
    • M
      remoteClientCloseFunc: Don't mangle connection object refcount · dab6bd97
      Michal Privoznik 提交于
      Well, in 8ad126e6 we tried to fix a memory corruption problem.
      However, the fix was not as good as it could be. I mean, the
      commit has one line more than it should. I've noticed this output
      just recently:
      
        # ./run valgrind --leak-check=full --show-reachable=yes ./tools/virsh domblklist gentoo
        ==17019== Memcheck, a memory error detector
        ==17019== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
        ==17019== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
        ==17019== Command: /home/zippy/work/libvirt/libvirt.git/tools/.libs/virsh domblklist gentoo
        ==17019==
        Target     Source
        ------------------------------------------------
        fda        /var/lib/libvirt/images/fd.img
        vda        /var/lib/libvirt/images/gentoo.qcow2
        hdc        /home/zippy/tmp/install-amd64-minimal-20150402.iso
      
        ==17019== Thread 2:
        ==17019== Invalid read of size 4
        ==17019==    at 0x4EFF5B4: virObjectUnref (virobject.c:258)
        ==17019==    by 0x5038CFF: remoteClientCloseFunc (remote_driver.c:552)
        ==17019==    by 0x5069D57: virNetClientCloseLocked (virnetclient.c:685)
        ==17019==    by 0x506C848: virNetClientIncomingEvent (virnetclient.c:1852)
        ==17019==    by 0x5082136: virNetSocketEventHandle (virnetsocket.c:1913)
        ==17019==    by 0x4ECD64E: virEventPollDispatchHandles (vireventpoll.c:509)
        ==17019==    by 0x4ECDE02: virEventPollRunOnce (vireventpoll.c:658)
        ==17019==    by 0x4ECBF00: virEventRunDefaultImpl (virevent.c:308)
        ==17019==    by 0x130386: vshEventLoop (vsh.c:1864)
        ==17019==    by 0x4F1EB07: virThreadHelper (virthread.c:206)
        ==17019==    by 0xA8462D3: start_thread (in /lib64/libpthread-2.20.so)
        ==17019==    by 0xAB441FC: clone (in /lib64/libc-2.20.so)
        ==17019==  Address 0x139023f4 is 4 bytes inside a block of size 240 free'd
        ==17019==    at 0x4C2B1F0: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
        ==17019==    by 0x4EA8949: virFree (viralloc.c:582)
        ==17019==    by 0x4EFF6D0: virObjectUnref (virobject.c:273)
        ==17019==    by 0x4FE74D6: virConnectClose (libvirt.c:1390)
        ==17019==    by 0x13342A: virshDeinit (virsh.c:406)
        ==17019==    by 0x134A37: main (virsh.c:950)
      
      The problem is, when registering remoteClientCloseFunc(), it's
      conn->closeCallback which is ref'd. But in the function itself
      it's conn->closeCallback->conn what is unref'd. This is causing
      imbalance in reference counting. Moreover, there's no need for
      the remote driver to increase/decrease conn refcount since it's
      not used anywhere. It's just merely passed to client registered
      callback. And for that purpose it's correctly ref'd in
      virConnectRegisterCloseCallback() and then unref'd in
      virConnectUnregisterCloseCallback().
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit e6893007)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      dab6bd97
  4. 29 8月, 2015 1 次提交
  5. 17 6月, 2015 1 次提交
    • E
      lxc: set nosuid+nodev+noexec flags on /proc/sys mount · 4ecffe77
      Eric W. Biederman 提交于
      Future kernels will mandate the use of nosuid+nodev+noexec
      flags when mounting the /proc/sys filesystem. Unconditionally
      add them now since they don't harm things regardless and could
      mitigate future security attacks.
      
      (cherry picked from commit 24710414)
      
      Conflicts:
          src/lxc/lxc_container.c
      4ecffe77
  6. 17 3月, 2015 1 次提交
    • E
      daemon: avoid memleak when ListAll returns nothing · 4fc4f669
      Eric Blake 提交于
      Commit 4f25146b (v1.2.8) managed to silence Coverity, but at the
      cost of a memory leak detected by valgrind:
      ==24129== 40 bytes in 5 blocks are definitely lost in loss record 355 of 637
      ==24129==    at 0x4A08B1C: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==24129==    by 0x5084B8E: virReallocN (viralloc.c:245)
      ==24129==    by 0x514D5AA: virDomainObjListExport (domain_conf.c:22200)
      ==24129==    by 0x201227DB: qemuConnectListAllDomains (qemu_driver.c:18042)
      ==24129==    by 0x51CC1B6: virConnectListAllDomains (libvirt-domain.c:6797)
      ==24129==    by 0x14173D: remoteDispatchConnectListAllDomains (remote.c:1580)
      ==24129==    by 0x121BE1: remoteDispatchConnectListAllDomainsHelper (remote_dispatch.h:1072)
      
      In short, every time a client calls a ListAll variant and asks
      for the resulting list, but there are 0 elements to return, we
      end up leaking the 1-entry array that holds the NULL terminator.
      
      What's worse, a read-only client can access these functions in a
      tight loop to cause libvirtd to eventually run out of memory; and
      this can be considered a denial of service attack against more
      privileged clients.  Thankfully, the leak is so small (8 bytes per
      call) that you would already have some other denial of service with
      any guest calling the API that frequently, so an out-of-memory
      crash is unlikely enough that this did not warrant a CVE.
      
      * daemon/remote.c (remoteDispatchConnectListAllDomains)
      (remoteDispatchDomainListAllSnapshots)
      (remoteDispatchDomainSnapshotListAllChildren)
      (remoteDispatchConnectListAllStoragePools)
      (remoteDispatchStoragePoolListAllVolumes)
      (remoteDispatchConnectListAllNetworks)
      (remoteDispatchConnectListAllInterfaces)
      (remoteDispatchConnectListAllNodeDevices)
      (remoteDispatchConnectListAllNWFilters)
      (remoteDispatchConnectListAllSecrets)
      (remoteDispatchNetworkGetDHCPLeases): Plug leak.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 3c2ff502)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      
      Conflicts:
      	daemon/remote.c - context with older cleanup styles
      4fc4f669
  7. 30 1月, 2015 1 次提交
    • M
      xend: Don't crash in virDomainXMLDevID · 394b31f0
      Michal Privoznik 提交于
      The function is called from all {Attach,Update,Detach}Device APIs to
      create config strings that are later passed to the xend to perform the
      desired action. The function is intended to handle all supported
      devices. However, as of 5b05358a we
      are trying to get disk driver of the device without checking if the
      device really is a disk. This leads to an segmentation fault:
      
        #0 0x00007ffff7571815 in virDomainDiskGetDriver () from /usr/lib/libvirt.so.0
        #1 0x00007fffeb9ad471 in ?? () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
        #2 0x00007fffeb9b1062 in xenDaemonAttachDeviceFlags () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
        #3 0x00007fffeb9a8a86 in ?? () from /usr/lib/libvirt/connection-driver/libvirt_driver_xen.so
        #4 0x00007ffff7609266 in virDomainAttachDevice () from /usr/lib/libvirt.so.0
        #5 0x0000555555593c9d in ?? ()
        #6 0x00007ffff76743c9 in virNetServerProgramDispatch () from /usr/lib/libvirt.so.0
        #7 0x00005555555a678d in ?? ()
        #8 0x00007ffff755460e in ?? () from /usr/lib/libvirt.so.0
        #9 0x00007ffff7553b06 in ?? () from /usr/lib/libvirt.so.0
        #10 0x00007ffff4998b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
        #11 0x00007ffff46e30ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
        #12 0x0000000000000000 in ?? ()
      Reported-by: NXiaolin Su <linxxnil@126.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit cd7702d4)
      394b31f0
  8. 23 1月, 2015 2 次提交
  9. 23 12月, 2014 2 次提交
    • P
      qemu: migration: Unlock vm on failed ACL check in protocol v2 APIs · 372bfe63
      Peter Krempa 提交于
      Avoid leaving the domain locked on a failed ACL check in
      qemuDomainMigratePerform() and qemuDomainMigrateFinish2().
      
      Introduced in commit abf75aea (Add ACL checks into the QEMU driver).
      
      (cherry picked from commit 2bdcd29c)
      372bfe63
    • L
      storage: fix crash caused by no check return before set close · 05ba8c50
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1087104#c5
      
      When trying to use an invalid offset to virStorageVolUpload(), libvirt
      fails in virFDStreamOpenFileInternal(), although it seems libvirt does
      not check the return in storageVolUpload(), and calls
      virFDStreamSetInternalCloseCb() right after.  But stream doesn't have a
      privateData (is NULL) yet, and the daemon crashes then.
      
      0  0x00007f09429a9c10 in pthread_mutex_lock () from /lib64/libpthread.so.0
      1  0x00007f094514dbf5 in virMutexLock (m=<optimized out>) at util/virthread.c:88
      2  0x00007f09451cb211 in virFDStreamSetInternalCloseCb at fdstream.c:795
      3  0x00007f092ff2c9eb in storageVolUpload at storage/storage_driver.c:2098
      4  0x00007f09451f46e0 in virStorageVolUpload at libvirt.c:14000
      5  0x00007f0945c78fa1 in remoteDispatchStorageVolUpload at remote_dispatch.h:14339
      6  remoteDispatchStorageVolUploadHelper at remote_dispatch.h:14309
      7  0x00007f094524a192 in virNetServerProgramDispatchCall at rpc/virnetserverprogram.c:437
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      (cherry picked from commit 87b9437f)
      05ba8c50
  10. 10 12月, 2014 1 次提交
    • M
      CVE-2014-8131: Fix possible deadlock and segfault in qemuConnectGetAllDomainStats() · 27431ec9
      Martin Kletzander 提交于
      When user doesn't have read access on one of the domains he requested,
      the for loop could exit abruptly or continue and override pointer which
      pointed to locked object.
      
      This patch fixed two issues at once.  One is that domflags might have
      had QEMU_DOMAIN_STATS_HAVE_JOB even when there was no job started (this
      is fixed by doing domflags |= QEMU_DOMAIN_STATS_HAVE_JOB only when the
      job was acquired and cleaning domflags on every start of the loop.
      Second one is that the domain is kept locked when
      virConnectGetAllDomainStatsCheckACL() fails and continues the loop when
      it didn't end.  Adding a simple virObjectUnlock() and clearing the
      pointer ought to do.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      (cherry picked from commit 57023c0a)
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      
      Conflicts:
      	src/qemu/qemu_driver.c -- GetAllDomainStats did not use jobs
                                        before 1f4831ee
      27431ec9
  11. 13 11月, 2014 1 次提交
    • L
      util: eliminate "use after free" in callers of virNetDevLinkDump · 6842f148
      Laine Stump 提交于
      virNetDevLinkDump() gets a message from netlink into "resp", then
      calls nlmsg_parse() to fill the table "tb" with pointers into resp. It
      then returns tb to its caller, but not before freeing the buffer at
      resp. That means that all the callers of virNetDevLinkDump() are
      examining memory that has already been freed. This can be verified by
      filling the buffer at resp with garbage prior to freeing it (or, I
      suppose, just running libvirtd under valgrind) then performing some
      operation that calls virNetDevLinkDump().
      
      The upstream commit log incorrectly states that the code has been like
      this ever since virNetDevLinkDump() was written. In reality, the
      problem was introduced with commit e95de74d, first in libvirt-1.0.5,
      which was attempting to eliminate a typecast that caused compiler
      warnings. It has only been pure luck (or maybe a lack of heavy load,
      and/or maybe an allocation algorithm in malloc() that delays re-use of
      just-freed memory) that has kept this from causing errors, for example
      when configuring a PCI passthrough or macvtap passthrough network
      interface.
      
      The solution taken in this patch is the simplest - just return resp to
      the caller along with tb, then have the caller free it after they are
      finished using the data (pointers) in tb. I alternately could have
      made a cleaner interface by creating a new struct that put tb and resp
      together along with a vir*Free() function for it, but this function is
      only used in a couple places, and I'm not sure there will be
      additional new uses of virNetDevLinkDump(), so the value of adding a
      new type, extra APIs, etc. is dubious.
      
      (cherry picked from commit f9f9699f)
      6842f148
  12. 07 11月, 2014 1 次提交
    • E
      CVE-2014-7823: dumpxml: security hole with migratable flag · c7500ce3
      Eric Blake 提交于
      Commit 28f8dfdc (v1.0.0) introduced a security hole: in at least
      the qemu implementation of virDomainGetXMLDesc, the use of the
      flag VIR_DOMAIN_XML_MIGRATABLE (which is usable from a read-only
      connection) triggers the implicit use of VIR_DOMAIN_XML_SECURE
      prior to calling qemuDomainFormatXML.  However, the use of
      VIR_DOMAIN_XML_SECURE is supposed to be restricted to read-write
      clients only.  This patch treats the migratable flag as requiring
      the same permissions, rather than analyzing what might break if
      migratable xml no longer includes secret information.
      
      Fortunately, the information leak is low-risk: all that is gated
      by the VIR_DOMAIN_XML_SECURE flag is the VNC connection password;
      but VNC passwords are already weak (FIPS forbids their use, and
      on a non-FIPS machine, anyone stupid enough to trust a max-8-byte
      password sent in plaintext over the network deserves what they
      get).  SPICE offers better security than VNC, and all other
      secrets are properly protected by use of virSecret associations
      rather than direct output in domain XML.
      
      * src/remote/remote_protocol.x (REMOTE_PROC_DOMAIN_GET_XML_DESC):
      Tighten rules on use of migratable flag.
      * src/libvirt-domain.c (virDomainGetXMLDesc): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit b1674ad5)
      
      Conflicts:
      	src/libvirt-domain.c - file split from older src/libvirt.c
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c7500ce3
  13. 01 10月, 2014 1 次提交
  14. 18 9月, 2014 8 次提交
  15. 17 9月, 2014 1 次提交
  16. 02 9月, 2014 1 次提交
  17. 01 9月, 2014 3 次提交
    • E
      blockcopy: allow larger buf-size · 0e4b49a0
      Eric Blake 提交于
      While qemu definitely caps granularity to 64 MiB, it places no
      limits on buf-size.  On a machine beefy enough for lots of
      memory, a buf-size larger than 2 GiB is feasible, so we should
      pass a 64-bit parameter.
      
      * include/libvirt/libvirt.h.in (VIR_DOMAIN_BLOCK_COPY_BUF_SIZE):
      Allow 64 bits.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      0e4b49a0
    • M
      selinux: properly label tap FDs with imagelabel · a4431931
      Martin Kletzander 提交于
      The cleanup in commit cf976d9d used secdef->label to label the tap
      FDs, but that is not possible since it's process-only label (svirt_t)
      and not a object label (e.g. svirt_image_t).  Starting a domain failed
      with EPERM, but simply using secdef->imagelabel instead of
      secdef->label fixes it.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a4431931
    • C
      Fix connection to already running session libvirtd · 0f03ca6d
      Christophe Fergeau 提交于
      Since 1b807f92, connecting with virsh to an already running session
      libvirtd fails with:
      $ virsh list --all
      error: failed to connect to the hypervisor
      error: no valid connection
      error: Failed to connect socket to
      '/run/user/1000/libvirt/libvirt-sock': Transport endpoint is already
      connected
      
      This is caused by a logic error in virNetSocketNewConnectUnix: even if
      the connection to the daemon socket succeeded, we still try to spawn the
      daemon and then connect to it.
      This commit changes the logic to not try to spawn libvirtd if we
      successfully connected to its socket.
      
      Most of this commit is whitespace changes, use of -w is recommended to
      look at it.
      0f03ca6d
  18. 30 8月, 2014 1 次提交
    • R
      storage: zfs: fix double listing of new volumes · c4d2a102
      Roman Bogorodskiy 提交于
      Currently, after calling commands to create a new volumes,
      virStorageBackendZFSCreateVol calls virStorageBackendZFSFindVols that
      calls virStorageBackendZFSParseVol.
      
      virStorageBackendZFSParseVol checks if a volume already exists by
      trying to get it using virStorageVolDefFindByName.
      
      For a just created volume it returns NULL, so volume is reported as
      new and appended to pool->volumes. This causes a volume to be listed
      twice as storageVolCreateXML appends this new volume to the list as
      well.
      
      Fix that by passing a new volume definition to
      virStorageBackendZFSParseVol so it could determine if it needs to add
      this volume to the list.
      c4d2a102
  19. 29 8月, 2014 7 次提交
    • J
      qemu_driver: Resolve Coverity FORWARD_NULL · 5c0dad7b
      John Ferlan 提交于
      In qemuDomainSnapshotCreateDiskActive() if we jumped to cleanup from a
      failed actions = virJSONValueNewArray(), then 'cfg' would be NULL.
      
      So just return -1, which in turn removes the need for cleanup:
      5c0dad7b
    • J
      virnetserverservice: Resolve Coverity ARRAY_VS_SINGLETON · e387f4c1
      John Ferlan 提交于
      Coverity complained about the following:
      
      (3) Event ptr_arith:
         Performing pointer arithmetic on "cur_fd" in expression "cur_fd++".
      130             return virNetServerServiceNewFD(*cur_fd++,
      
      The complaint is that pointer arithmetic taking place instead of the
      expected auto increment of the variable...  Adding some well placed
      parentheses ensures our order of operation.
      e387f4c1
    • J
      qemu: Allow use of iothreads for disk definitions · ef8da2ad
      John Ferlan 提交于
      For virtio-blk-pci disks with the disk iothread attribute that are
      running the correct emulator, add the "iothread=iothread#" to the
      -device command line in order to enable iothreads for the disk as
      long as the command is available, the disk iothread value provided is
      valid, and is supported for the disk device being added
      ef8da2ad
    • J
      domain_conf: Add support for iothreads in disk definition · e2523de5
      John Ferlan 提交于
      Add a new disk "driver" attribute "iothread" to be parsed as the thread
      number for the disk to use. In order to more easily facilitate the usage
      and configuration of the iothread, a "zero" for the attribute indicates
      iothreads are not supported for the device and a positive value indicates
      the specific thread to try and use.
      e2523de5
    • J
      qemu: Add support for iothreads · 72edaae7
      John Ferlan 提交于
      Add a new capability to ensure the iothreads feature exists for the qemu
      emulator being run - requires the "query-iothreads" QMP command. Using the
      domain XML add correspoding command argument in order to generate the
      threads. The iothreads will use a name space "iothread#" where, the
      future patch to add support for using an iothread to a disk definition to
      merely define which of the available threads to use.
      
      Add tests to ensure the xml/argv processing is correct.  Note that no
      change was made to qemuargv2xmltest.c as processing the -object element
      would require knowing more than just iothreads.
      72edaae7
    • J
      domain_conf: Introduce iothreads XML · ee3a9620
      John Ferlan 提交于
      Introduce XML to allowing adding iothreads to the domain. These can be
      used by virtio-blk-pci devices in order to assign a specific thread to
      handle the workload for the device.  The iothreads are the official
      implementation of the virtio-blk Data Plane that's been in tech preview
      for QEMU.
      ee3a9620
    • J
      libxl_migration: Resolve Coverity NULL_RETURNS · 0322643e
      John Ferlan 提交于
      Coverity noted that all callers to libxlDomainEventQueue() could ensure
      the second parameter (event) was true before calling except this case.
      As I look at the code and how events are used - it seems that prior to
      generating an event for the dom == NULL condition, the resume/suspend
      event should be queue'd after the virDomainSaveStatus() call which will
      goto cleanup and queue the saved event anyway.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      0322643e
  20. 28 8月, 2014 2 次提交
    • P
      qemu: Implement bulk stats API and one of the stats groups to return · d1bde8ed
      Peter Krempa 提交于
      Implement the API function for virDomainListGetStats and
      virConnectGetAllDomainStats in a modular way and implement the
      VIR_DOMAIN_STATS_STATE group of statistics.
      
      Although it may look like the function looks universal I'd rather not
      expose it to other drivers as the coming stats groups are likely to do
      qemu specific stuff to obtain the stats.
      d1bde8ed
    • J
      qemu_command: Resolve Coverity DEADCODE · 84bfb11b
      John Ferlan 提交于
      One useless warning, but the other one rather pertinent. On entry
      the 'trans' variable is initialized to VIR_DOMAIN_DISK_TRANS_DEFAULT.
      When the "trans" was found in the parsing loop it def->geometry.trans
      was assigned to the return from virDomainDiskGeometryTransTypeFromString
      and then 'trans' was used to do the comparison to see if it was valid.
      
      So remove 'trans' and use def->geometry.trans properly
      84bfb11b