1. 23 1月, 2015 1 次提交
  2. 24 12月, 2014 1 次提交
  3. 16 11月, 2014 3 次提交
  4. 08 11月, 2014 1 次提交
    • E
      CVE-2014-7823: dumpxml: security hole with migratable flag · bdbcf66a
      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; context with older virLibConnError
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bdbcf66a
  5. 30 10月, 2014 3 次提交
  6. 02 10月, 2014 1 次提交
  7. 18 9月, 2014 1 次提交
  8. 09 9月, 2014 10 次提交
  9. 08 9月, 2014 3 次提交
  10. 02 9月, 2014 1 次提交
  11. 27 8月, 2014 1 次提交
    • D
      Don't include @libs@ in libvirt.pc.in file · 76ad3133
      Daniel P. Berrange 提交于
      The libvirt.pc file we install is ending up polluted with a
      load of compiler flags that should be private to the libvirt
      build. eg
      
      Libs: -L${libdir} -lvirt -ldl -O2 -g -pipe -Wall \
            -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
            -fstack-protector-strong --param=ssp-buffer-size=4 \
            -grecord-gcc-switches  -m64 -mtune=generic
      
      this is caused by including @libs@ in the Libs: line of the
      pkgconfig.pc.in file.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      (cherry picked from commit 1167751f)
      76ad3133
  12. 03 7月, 2014 2 次提交
    • P
      qemu: copy: Accept 'format' parameter when copying to a non-existing img · e7ee7542
      Peter Krempa 提交于
      We have the following matrix of possible arguments handled by the logic
      statement touched by this patch:
             | flags & _REUSE_EXT | !(flags & _REUSE_EXT)
      -------+--------------------+----------------------
       format| (1)                | (2)
      -------+--------------------+----------------------
      !format| (3)                | (4)
      -------+--------------------+----------------------
      
      In cases 1 and 2 the user provided a format, in cases 3 and 4 not. The
      user requests to use a pre-existing image in 1 and 3 and libvirt will
      create a new image in 2 and 4.
      
      The difference between cases 3 and 4 is that for 3 the format is probed
      from the user-provided image, whereas in 4 we just use the existing disk
      format.
      
      The current code would treat cases 1,3 and 4 correctly but in case 2 the
      format provided by the user would be ignored.
      
      The particular piece of code was broken in commit 35c7701c
      but since it was introduced a few commits before that it was never
      released as working.
      
      (cherry picked from commit 42619ed0)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      
      Conflicts:
      	src/qemu/qemu_driver.c - no refactoring of commits 7b7bf001, 4f202266
      e7ee7542
    • E
      build: fix 'make check' with newer git · 1fae811a
      Eric Blake 提交于
      Newer git doesn't like the maint.mk rule 'public-submodule-commit'
      run during 'make check', as inherited from our checkout of gnulib.
      I tracked down that libvirt commit 8531301d picked up a gnulib fix
      that makes git happy.  Rather than try and do a full .gnulib
      submodule update to gnulib.git d18d1b802 (as used in that libvirt
      commit), it was easier to just backport the fixed maint.mk from
      gnulib on top of our existing submodule level.  I did it as follows,
      where these steps will have to be repeated when cherry-picking this
      commit to any other maintenance branch:
      
      mkdir -p gnulib/local/top
      cd .gnulib
      git checkout d18d1b802 top/maint.mk
      git diff HEAD > ../gnulib/local/top/maint.mk.diff
      git reset --hard
      cd ..
      git add gnulib/local/top
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1fae811a
  13. 27 6月, 2014 2 次提交
    • E
      docs: publish correct enum values · 4f634078
      Eric Blake 提交于
      We publish libvirt-api.xml for others to use, and in fact, the
      libvirt-python bindings use it to generate python constants that
      correspond to our enum values.  However, we had an off-by-one bug
      that any enum that relied on C's rules for implicit initialization
      of the first enum member to 0 got listed in the xml as having a
      value of 1 (and all later members of the enum were equally
      botched).
      
      The fix is simple - since we add one to the previous value when
      encountering an enum without an initializer, the previous value
      must start at -1 so that the first enum member is assigned 0.
      
      The python generator code has had the off-by-one ever since DV
      first wrote it years ago, but most of our public enums were immune
      because they had an explicit = 0 initializer.  The only affected
      enums are:
      - virDomainEventGraphicsAddressType (such as
      VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4), since commit 987e31ed
      (libvirt v0.8.0)
      - virDomainCoreDumpFormat (such as VIR_DOMAIN_CORE_DUMP_FORMAT_RAW),
      since commit 9fbaff00 (libvirt v1.2.3)
      - virIPAddrType (such as VIR_IP_ADDR_TYPE_IPV4), since commit
      03e0e79e (not yet released)
      
      Thanks to Nehal J Wani for reporting the problem on IRC, and
      for helping me zero in on the culprit function.
      
      * docs/apibuild.py (CParser.parseEnumBlock): Fix implicit enum
      values.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      (cherry picked from commit 9b291bbe)
      4f634078
    • P
      qemu: blockcopy: Don't remove existing disk mirror info · ea1d4666
      Peter Krempa 提交于
      When creating a new disk mirror the new struct is stored in a separate
      variable until everything went well. The removed hunk would actually
      remove existing mirror information for example when the api would be run
      if a mirror still exists.
      
      (cherry picked from commit 02b364e1)
      
      This fixes a regression introduced in commit ff5f30b6.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      
      Conflicts:
      	src/qemu/qemu_driver.c - no refactoring of commits 7b7bf001, 4f202266
      ea1d4666
  14. 06 5月, 2014 1 次提交
  15. 05 5月, 2014 1 次提交
    • J
      libxl: fix framebuffer port setting for HVM domains · 81173859
      Jim Fehlig 提交于
      libxl uses the libxl_vnc_info and libxl_sdl_info fields from the
      hvm union in libxl_domain_build_info struct when generating QEMU
      args for VNC or SDL.  These fields were left unset by the libxl
      driver, causing libxl to ignore any user settings.  E.g. with
      
        <graphics type='vnc' port='5950'/>
      
      port would be ignored and QEMU would instead be invoked with
      
        -vnc 127.0.0.1:0,to=99
      
      Unlike the libxl_domain_config struct, the libxl_domain_build_info
      contains only a single libxl_vnc_info and libxl_sdl_info, so
      populate these fields from the first vfb in
      libxl_domain_config->vfbs.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Signed-off-by: NDavid Kiarie <davidkiarie4@gmail.com>
      (cherry picked from commit b55cc5f4)
      81173859
  16. 04 5月, 2014 4 次提交
    • C
      Prep for release 1.1.3.5 · 107fbc94
      Cole Robinson 提交于
      107fbc94
    • M
      qemu: Introduce qemuDomainDefCheckABIStability · 802b47a0
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=994364
      
      Whenever we check for ABI stability, we have new xml (e.g. provided by
      user, or obtained from snapshot, whatever) which we compare to old xml
      and see if ABI won't break. However, if the new xml was produced via
      virDomainGetXMLDesc(..., VIR_DOMAIN_XML_MIGRATABLE) it lacks some
      devices, e.g. 'pci-root' controller. Hence, the ABI stability check
      fails even though it is stable. Moreover, we can't simply fix
      virDomainDefCheckABIStability because removing the correct devices is
      task for the driver. For instance, qemu driver wants to remove the usb
      controller too, while LXC driver doesn't. That's why we need special
      qemu wrapper over virDomainDefCheckABIStability which removes the
      correct devices from domain XML, produces MIGRATABLE xml and calls the
      check ABI stability function.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit 7d704812)
      802b47a0
    • L
      interface: dump inactive xml when interface isn't active · 34c592fa
      Laine Stump 提交于
      Other drivers in libvirt (e.g. network, qemu) will automatically
      return the "inactive" (persistent configuration) XML of an object when
      that object is inactive. The netcf backend of the interface driver
      would always try to return the live status XML of the interface, even
      when it was down. Although netcf does return valid XML in that case,
      for bond interfaces it is missing almost all of its content, including
      the <bond> subelement itself, leading to this error message from
      "virsh iface-dumpxml" of a bond interface that is inactive:
      
        error: XML error: bond interface misses the bond element
      
      (this is because libvirt's validation of the XML returned by netcf
      always requires a <bond> element be present).
      
      This patch modifies the interface driver netcf backend to check if the
      interface is inactive, and in that case always return the inactive XML
      (which will always have a <bond> element, thus eliminating the error
      message, as well as making operation more in line with other drivers.
      
      This fixes the following bug:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=878394
      
      (cherry picked from commit 7284c499)
      34c592fa
    • M
      interface: Introduce netcfInterfaceObjIsActive · 04503706
      Michal Privoznik 提交于
      This function barely wraps ncf_if_status() and error handling code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      (cherry picked from commit 50f5468c)
      04503706
  17. 03 5月, 2014 1 次提交
  18. 01 5月, 2014 1 次提交
  19. 18 4月, 2014 1 次提交
  20. 16 4月, 2014 1 次提交