1. 06 7月, 2011 7 次提交
  2. 05 7月, 2011 3 次提交
  3. 04 7月, 2011 14 次提交
    • D
      Add documentation for the seclabel XML element · 6bcd732e
      Daniel P. Berrange 提交于
      The domain XML documentation is missing information about the
      <seclabel> element used by security drivers
      
      * formatdomain.html.in: Document <seclabel>
      6bcd732e
    • D
      Allow for resource relabelling with static labels · 6321fd97
      Daniel P. Berrange 提交于
      Add a new attribute to the <seclabel> XML to allow resource
      relabelling to be enabled with static label usage.
      
        <seclabel model='selinux' type='static' relabel='yes'>
          <label>system_u:system_r:svirt_t:s0:c392,c662</label>
        </seclabel>
      
      * docs/schemas/domain.rng: Add relabel attribute
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Parse
        the 'relabel' attribute
      * src/qemu/qemu_process.c: Unconditionally clear out the
        'imagelabel' attribute
      * src/security/security_apparmor.c: Skip based on 'relabel'
        attribute instead of label type
      * src/security/security_selinux.c: Skip based on 'relabel'
        attribute instead of label type and fill in <imagelabel>
        attribute if relabel is enabled.
      6321fd97
    • D
      Allow a base label to be specified in dynamic labelling mode · 4ebfc427
      Daniel P. Berrange 提交于
      Normally the dynamic labelling mode will always use a base
      label of 'svirt_t' for VMs. Introduce a <baselabel> field
      in the <seclabel> XML to allow this base label to be changed
      
      eg
      
         <seclabel type='dynamic' model='selinux'>
           <baselabel>system_u:object_r:virt_t:s0</baselabel>
         </seclabel>
      
      * docs/schemas/domain.rng: Add <baselabel>
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Parsing
        of base label
      * src/qemu/qemu_process.c: Don't reset 'model' attribute if
        a base label is specified
      * src/security/security_apparmor.c: Refuse to support base label
      * src/security/security_selinux.c: Use 'baselabel' when generating
        label, if available
      4ebfc427
    • O
      storage: Do not override the exact error of createRawFile · 49826eda
      Osier Yang 提交于
      virStorageBackendCreateRaw: createRawFile already reported the
      exact error.
      
      Before the fix:
      
      error: Failed to create vol vol-create.img
      error: cannot create path '/var/lib/libvirt/images/vol-create.img': Unknown error 18446744073709551597
      
      After the fix:
      
      error: Failed to create vol vol-create.img
      error: cannot fill file '/var/lib/libvirt/images/vol-create.img': No space left on device
      49826eda
    • D
      Release of libvirt-0.9.3 · 7976d96d
      Daniel Veillard 提交于
      * configure.ac docs/news.html.in libvirt.spec.in: update for the
        new release
      * po/*.po*: updated and regenerated localizations
      7976d96d
    • W
      initialize pointer to NULL · 1aa5f85b
      Wen Congyang 提交于
      cmd is not initialized to NULL, but we try to freed it if we
      meet some error.
      1aa5f85b
    • E
      storage: avoid crash on parse error · 5dc404b7
      Eric Blake 提交于
      Coverity detected that we could crash on bogus input.  Meanwhile,
      strtok_r is rather heavy compared to strchr.
      
      * src/storage/storage_backend_iscsi.c (virStorageBackendIQNFound):
        Check for parse failure, and use lighter-weight functions.
      5dc404b7
    • E
      vmware: avoid null deref on failed lookup · 222f6233
      Eric Blake 提交于
      * src/vmware/vmware_driver.c (vmwareDomainReboot): Check error
        before dereferencing memory.
      222f6233
    • E
      qemu: avoid null deref on low memory · 74d224fa
      Eric Blake 提交于
      Detected by Coverity.  qemuDomainEventQueue requires a non-NULL
      pointer; most callers silently drop the event if we encountered
      and OOM situation trying to create the event.
      
      * src/qemu/qemu_migration.c (qemuMigrationFinish): Check for OOM.
      74d224fa
    • E
      cgroup: silence coverity warning · 3f81f8e4
      Eric Blake 提交于
      Coverity noted that most clients reacted to failure to hash; but in
      a best-effort kill loop, we can ignore failure.
      
      * src/util/cgroup.c (virCgroupKillInternal): Ignore hash failure.
      3f81f8e4
    • E
      rpc: silence coverity warning · dd0c42ab
      Eric Blake 提交于
      Coverity noted that 4 out of 5 calls to virNetClientStreamRaiseError
      checked the return value.  This case expects a particular value, so
      warn if our expectations went wrong due to some bug elsewhere.
      
      * src/rpc/virnetclient.c (virNetClientCallDispatchStream): Warn on
        unexpected scenario.
      dd0c42ab
    • E
      qemu: silence coverity warnings · aaea56dc
      Eric Blake 提交于
      Coverity warns if the majority of callers check a function for
      errors, but a few don't; but in qemu_audit and qemu_domain, the
      choice to not check for failures was safe.  In qemu_command, the
      failure to generate a uuid can only occur on a bad pointer.
      
      * src/qemu/qemu_audit.c (qemuAuditCgroup): Ignore failure to get
        cgroup controller.
      * src/qemu/qemu_domain.c (qemuDomainObjEnterMonitor)
        (qemuDomainObjEnterMonitorWithDriver): Ignore failure to get
        timestamp.
      * src/qemu/qemu_command.c (qemuParseCommandLine): Check for error.
      aaea56dc
    • E
      rpc: avoid memory leak on error · 6e07f72e
      Eric Blake 提交于
      Detected by Coverity.  The leak is on an error path, but I'm not
      sure whether that path is likely to be triggered in practice.
      
      * src/rpc/virnetserverservice.c (virNetServerServiceAccept): Plug leak.
      6e07f72e
    • E
      rpc: fix logic bug · 2aa83b43
      Eric Blake 提交于
      Spotted by Coverity.  If we don't update tmp each time through
      the loop, then if the filter being removed was not the head of
      the list, we accidentally lose all filters prior to the one we
      wanted to remove.
      
      * src/rpc/virnetserverclient.c (virNetServerClientRemoveFilter):
          Don't lose unrelated filters.
      2aa83b43
  4. 02 7月, 2011 7 次提交
    • E
      pci: avoid memory leak on error · 95eaf7ba
      Eric Blake 提交于
      Detected by Coverity.  Some, but not all, error paths were clean;
      but they were repetitive so I refactored them.
      
      * src/util/pci.c (pciGetDevice): Plug leak.
      95eaf7ba
    • E
      interface: avoid memory leak on parse error · 9e8b7c15
      Eric Blake 提交于
      Detected by Coverity.  Unlikely to hit unless the file contents
      were corrupted.
      
      * src/util/interface.c (ifaceRestoreMacAddress): Plug leak.
      9e8b7c15
    • E
      libvirtd: avoid memory leak on OOM · e07e9a94
      Eric Blake 提交于
      Detected by Coverity; only strikes on OOM so not serious.
      
      * daemon/libvirtd.c (daemonPidFilePath): Plug leak.
      e07e9a94
    • E
      build: avoid 'make syntax-check' failure · 5d382c57
      Eric Blake 提交于
      * tests/utiltest.c (DO_TEST): Fix indentation for cppi.
      5d382c57
    • M
      tests: Add a general util test · ab0b2c19
      Matthias Bolte 提交于
      Move non-esx specific tests from esxutilstest there and add a
      test for virParseVersionString.
      ab0b2c19
    • E
      util: choose whether to require micro in version strings · 8ce1afff
      Eric Blake 提交于
      To avoid regressions, we let callers specify whether to require a
      minor and micro version.  Callers that were parsing uname() output
      benefit from defaulting to 0, whereas callers that were parsing
      version strings from other sources should not change in behavior.
      
      * src/util/util.c (virParseVersionString): Allow caller to choose
      whether to fail if minor or micro is missing.
      * src/util/util.h (virParseVersionString): Update signature.
      * src/esx/esx_driver.c (esxGetVersion): Update callers.
      * src/lxc/lxc_driver.c (lxcVersion): Likewise.
      * src/openvz/openvz_conf.c (openvzExtractVersionInfo): Likewise.
      * src/uml/uml_driver.c (umlGetVersion): Likewise.
      * src/vbox/vbox_MSCOMGlue.c (vboxLookupVersionInRegistry):
      Likewise.
      * src/vbox/vbox_tmpl.c (vboxExtractVersion): Likewise.
      * src/vmware/vmware_conf.c (vmwareExtractVersion): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiGetVersion): Likewise.
      Reported by Matthias Bolte.
      8ce1afff
    • E
      build: consistently use CFLAGS · 6ae3052c
      Eric Blake 提交于
      According to the automake manual, CPPFLAGS (aka INCLUDES, as spelled
      in automake 1.9.6) should only include -I, -D, and -U directives; more
      generic directives like -Wall belong in CFLAGS since they affect more
      phases of the build process.  Therefore, we should be sticking CFLAGS
      additions into a CFLAGS container, not a CPPFLAGS container.
      
      * src/Makefile.am (libvirt_driver_vmware_la_CFLAGS): Use AM_CFLAGS.
      (INCLUDES): Move CFLAGS items...
      (AM_CFLAGS): ...to their proper location.
      * python/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
      * tests/Makefile.am (INCLUDES, AM_CFLAGS): Likewise.
      (commandtest_CFLAGS, commandhelper_CFLAGS)
      (virnetmessagetest_CFLAGS, virnetsockettest_CFLAGS): Use AM_CFLAGS.
      6ae3052c
  5. 01 7月, 2011 9 次提交