1. 01 8月, 2012 10 次提交
  2. 31 7月, 2012 5 次提交
    • E
      qemu: fix use after free · 665c8cde
      Eric Blake 提交于
      Detected by Coverity.
      
      * src/qemu/qemu_hotplug.c (qemuDomainAttachHostDevice): Avoid
      double free of usb on failure.
      665c8cde
    • J
      build: Don't export xenLinuxDomainBlockStats symbol · 73bc94c5
      Jiri Denemark 提交于
      The symbol is only used within Xen driver.
      73bc94c5
    • G
      build: distribute virsh related source files · b254cad9
      Guannan Ren 提交于
      In virsh.c, it includes multiple virsh source files, we need
      to have them distributed.
      b254cad9
    • E
      build: fix build without HAVE_CAPNG · 6f926c5e
      Eric Blake 提交于
      Otherwise, a build may fail with:
      
      lxc/lxc_conatiner.c: In function 'lxcContainerDropCapabilities':
      lxc/lxc_container.c:1662:46: error: unused parameter 'keepReboot' [-Werror=unused-parameter]
      
      * src/lxc/lxc_container.c (lxcContainerDropCapabilities): Mark
      parameter unused.
      6f926c5e
    • J
      daemon: Fix crash in virTypedParameterArrayClear · 6039a2cb
      Jiri Denemark 提交于
      Daemon uses the following pattern when dispatching APIs with typed
      parameters:
      
          VIR_ALLOC_N(params, nparams);
          virDomain*(dom, params, &nparams, flags);
          virTypedParameterArrayClear(params, nparams);
      
      In case nparams was originally set to 0, virDomain* API would fill it
      with the number of typed parameters it can provide and we would use this
      number (rather than zero) to clear params. Because VIR_ALLOC* returns
      non-NULL pointer even if size is 0, the code would end up walking
      through random memory. If we were lucky enough and the memory contained
      7 (VIR_TYPED_PARAM_STRING) at the right place, we would try to free a
      random pointer and crash.
      
      Let's make sure params stays NULL when nparams is 0.
      6039a2cb
  3. 30 7月, 2012 21 次提交
  4. 29 7月, 2012 1 次提交
  5. 28 7月, 2012 1 次提交
    • J
      security: Skip labeling resources when seclabel defaults to none · ce53382b
      Jiri Denemark 提交于
      If a domain is explicitly configured with <seclabel type="none"/> we
      correctly ensure that no labeling will be done by setting
      norelabel=true. However, if no seclabel element is present in domain XML
      and hypervisor is configured not to confine domains by default, we only
      set type to "none" without turning off relabeling. Thus if such a domain
      is being started, security driver wants to relabel resources with
      default label, which doesn't make any sense.
      
      Moreover, with SELinux security driver, the generated image label lacks
      "s0" sensitivity, which causes setfilecon() fail with EINVAL in
      enforcing mode.
      ce53382b
  6. 27 7月, 2012 2 次提交
    • E
      maint: regenerate bootstrap · 85f416fd
      Eric Blake 提交于
      Commit 3ad13c92 blindly touched all files to have a 3-line
      hint for getting LGPL, but bootstrap is synced from gnulib where
      it has a 2-line hint.
      
      * bootstrap: Resync from gnulib.
      85f416fd
    • G
      libvirt-guests: systemd host shutdown does not work · 79ca7e4e
      Gerd v. Egidy 提交于
      I originally postet this into the Fedora bugzilla
      https://bugzilla.redhat.com/show_bug.cgi?id=843836
      
      Currently gracefully shutting down guest vms on host shutdown does not work on
      Fedora 17, the guests are killed hard on system shutdown.
      
      The reason is systemd considers libvirt-guests.service to be stopped when the
      system is running:
      
      $ systemctl status libvirt-guests.service
      libvirt-guests.service - Suspend Active Libvirt Guests
                Loaded: loaded (/usr/lib/systemd/system/libvirt-guests.service;
      enabled)
                Active: deactivating (stop) since Fri, 27 Jul 2012 15:47:31 +0200;
      2min 48s ago
               Process: 1085 ExecStart=/etc/init.d/libvirt-guests start
      (code=exited, status=0/SUCCESS)
               Control: 1150 (libvirt-guests)
                CGroup: name=systemd:/system/libvirt-guests.service
                        └ control
                          ├ 1150 /bin/sh /etc/init.d/libvirt-guests stop
                          └ 2257 sleep 1
      
      libvirt-guests.service is defined as type "simple" in systemd (the default).
      That means systemd will shut down the service when the start executable is
      terminated after starting is done. Systemd will not call stop again on system
      shutdown because it thinks it is already stopped.
      
      The solution is to define it as type "oneshot" and set the flag
      "RemainAfterExit". Then systemd will consider the service as active after
      startup and will call the stop function on host shutdown.
      79ca7e4e