1. 21 12月, 2017 3 次提交
  2. 20 12月, 2017 1 次提交
    • C
      virt-aa-helper: handle more disk images · 0f33025a
      Cédric Bosdonnat 提交于
      virt-aa-helper needs read access to the disk image to resolve symlinks
      and add the proper rules to the profile. Its profile whitelists a few
      common paths, but users can place their images anywhere.
      
      This commit helps users allowing access to their images by adding their
      own rules in apparmor.d/local/usr.lib.libvirt.virt-aa-helper.
      
      This commit also adds rules to allow reading files named:
        - *.raw as this is a rather common disk image extension
        - /run/libvirt/**[vd]d[a-z] as these are used by virt-sandbox
      0f33025a
  3. 19 12月, 2017 2 次提交
  4. 18 12月, 2017 1 次提交
  5. 16 12月, 2017 1 次提交
  6. 15 12月, 2017 3 次提交
    • A
      cfg.mk: Simplify backslash alignment check · f131dacf
      Andrea Bolognani 提交于
      The use of [[:blank:]] was intended to cover tabs as well, but
      it couldn't possibly work in its current form, so the regex was
      tweaked in d09429ab.
      
      With the original reason for using [[:blank:]] now gone, we can
      replace its usage with plain spaces. A comment about the purpose
      of the check is added as well.
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      f131dacf
    • L
      qemu: log error on attempts to set filterref on an OVS-connected interface · 16a9a281
      Laine Stump 提交于
      ebtables/iptables processing is skipped for any interface connected to
      Open vSwitch (they have their own packet filtering), likewise for
      midonet (according to
      http://blog.midokura.com/2016/04/midonet-rule-chains), but libvirt
      would allow adding a <filterref> to interfaces connected in these
      ways, so the user might mistakenly believe they were being protected.
      
      This patch checks for a non-NULL <virtualport> element for an
      interface (or its network) and logs an error if <virtualport> and
      <filterref> are both present. This could cause some previously working
      domains to no longer start, but that's really the whole point of this
      patch - to warn people that their filterref isn't protecting them as
      they might have thought.
      
      I don't bother checking this during post-parse validation, because
      such a check would be incomplete - it's possible that a network would
      have a <virtualport> that would be applied to an interface, and you
      can't know that until the domain is started.
      
      Resolves: https://bugzilla.redhat.com/1502754
      16a9a281
    • L
      qemu: delete exist bandwidth restrictions when they are removed from config · b21163bd
      Laine Stump 提交于
      When the <bandwidth> of an interface is changed with update-device,
      the old settings are cleared with tc, then new settings added with
      tc. But if the <bandwidth has been removed, the old settings weren't
      being removed, so the bandwidth restrictions would still be active on
      the interface although the interface status in libvirt showed that
      they had been removed.
      
      This patch fixes it by calling virNetDevBandwidthClear() if the
      "modification" to the interface bandwidth was to completely clear
      it.
      
      An alternative could have been to modify virNetDevBandwidthSet() to
      always clear existing bandwith settings at the beginning of the
      function (currently it short circuits in that case, doing nothing),
      but that would have led to cases where virNetDevBandwidthClear() was
      now being called in cases where it previously wasn't, and while many
      of those cases would be NOPs, there could be cases where it would
      cause an error. The way this patch works, the ...Clear() function is
      only called in cases where the ...Set() function had previously been
      called successfully, so the risk of regression is minimized.
      
        Resolves: https://bugzilla.redhat.com/1454709
      b21163bd
  7. 14 12月, 2017 16 次提交
  8. 13 12月, 2017 3 次提交
  9. 12 12月, 2017 4 次提交
    • M
      fillQemuCaps: Don't leak machine string · fb8c0ea8
      Michal Privoznik 提交于
      ==25251== 5 bytes in 1 blocks are definitely lost in loss record 7 of 81
      ==25251==    at 0x4C2BEDF: malloc (vg_replace_malloc.c:299)
      ==25251==    by 0x967E379: strdup (in /lib64/libc-2.25.so)
      ==25251==    by 0x5366F9F: virStrdup (virstring.c:941)
      ==25251==    by 0x538BF1D: virDomainCapsNew (domain_capabilities.c:121)
      ==25251==    by 0x10EACE: test_virDomainCapsFormat (domaincapstest.c:295)
      ==25251==    by 0x10FBD2: virTestRun (testutils.c:180)
      ==25251==    by 0x10F192: mymain (domaincapstest.c:457)
      ==25251==    by 0x111C7F: virTestMain (testutils.c:1119)
      ==25251==    by 0x10FA3C: main (domaincapstest.c:528)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fb8c0ea8
    • M
      xenMakeIPList: Don't leak @address_array · 34fb67ef
      Michal Privoznik 提交于
      ==32171== 32 bytes in 1 blocks are definitely lost in loss record 44 of 107
      ==32171==    at 0x4C2DEF6: calloc (vg_replace_malloc.c:711)
      ==32171==    by 0x55744A9: virAllocN (viralloc.c:191)
      ==32171==    by 0x12CED2: xenMakeIPList (xen_common.c:1186)
      ==32171==    by 0x12D0BE: xenFormatNet (xen_common.c:1221)
      ==32171==    by 0x12F0D2: xenFormatVif (xen_common.c:1889)
      ==32171==    by 0x12F2B4: xenFormatConfigCommon (xen_common.c:1944)
      ==32171==    by 0x13BA32: xenFormatXL (xen_xl.c:1971)
      ==32171==    by 0x1186CA: testCompareParseXML (xlconfigtest.c:105)
      ==32171==    by 0x118A64: testCompareHelper (xlconfigtest.c:205)
      ==32171==    by 0x119E36: virTestRun (testutils.c:180)
      ==32171==    by 0x11970E: mymain (xlconfigtest.c:301)
      ==32171==    by 0x11BEE3: virTestMain (testutils.c:1119)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      34fb67ef
    • M
      xenParseXLVnuma: Don't leak @tmp and @token · 747faf11
      Michal Privoznik 提交于
      ==30399== 180 (144 direct, 36 indirect) bytes in 3 blocks are definitely lost in loss record 91 of 111
      ==30399==    at 0x4C2E0FF: realloc (vg_replace_malloc.c:785)
      ==30399==    by 0x5574572: virReallocN (viralloc.c:245)
      ==30399==    by 0x5574668: virExpandN (viralloc.c:294)
      ==30399==    by 0x55747AB: virResizeN (viralloc.c:352)
      ==30399==    by 0x560074D: virStringSplitCount (virstring.c:115)
      ==30399==    by 0x137A59: xenParseXLVnuma (xen_xl.c:442)
      ==30399==    by 0x13952B: xenParseXL (xen_xl.c:1064)
      ==30399==    by 0x11884D: testCompareFormatXML (xlconfigtest.c:152)
      ==30399==    by 0x118A87: testCompareHelper (xlconfigtest.c:207)
      ==30399==    by 0x119E36: virTestRun (testutils.c:180)
      ==30399==    by 0x119186: mymain (xlconfigtest.c:274)
      ==30399==    by 0x11BEE3: virTestMain (testutils.c:1119)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      747faf11
    • Y
      Fix minor typos · ca18914e
      Yuri Chornoivan 提交于
      ca18914e
  10. 11 12月, 2017 2 次提交
  11. 10 12月, 2017 4 次提交
    • L
      qemu: Introduce qemuDomainDeviceDefValidateControllerIDE · 07adbd4b
      Lin Ma 提交于
      Move the IDE controller check from command line building to
      controller def validation. Also explicitly include the avoidance
      check for the implicit IDE controller from qemuBuildSkipController.
      
      Cause the IDE case for command line building to generate a
      failure if called to add an IDE since that shouldn't happen
      if the Validate code did the right thing.
      07adbd4b
    • J
      qemu: Move CCW S390 Address check to controller def validate · 29d8c17b
      John Ferlan 提交于
      Move the call to qemuDomainCheckCCWS390AddressSupport from
      qemuBuildControllerDevStr to qemuDomainDeviceDefValidateController.
      
      This means we will get the qemuCaps from the driver opaque
      variable passed to qemuDomainDeviceDefValidate.
      29d8c17b
    • J
      qemu: Introduce qemuDomainDeviceDefValidateController · 3ba92186
      John Ferlan 提交于
      Introduce the bare bones helper to validate whether the controller
      definition is valid.
      3ba92186
    • J
      qemu: Introduce qemuBuildSkipController · ac0fb44a
      John Ferlan 提交于
      Move the non USB implicit controller checks into their own
      helper to reduce the cruft in qemuBuildControllerDevCommandLine.
      ac0fb44a