1. 17 5月, 2013 20 次提交
  2. 16 5月, 2013 20 次提交
    • O
      utils: Add a helper to get the device name that sg device mapped to · 28d3ad95
      Osier Yang 提交于
      E.g.
      
      % sg_map
      /dev/sg0  /dev/sda
      /dev/sg1  /dev/sr0
      
      What the helper gets for /dev/sg0 is /dev/sda, it will be used by
      later patch.
      28d3ad95
    • O
      qemu: Rename qemu_driver->sharedDisks to qemu_driver->sharedDevices · 539d0e19
      Osier Yang 提交于
      "Shared disk" is not only the thing we should care about after "scsi
      hostdev" is introduced. A same scsi device can be used as "disk" for
      one domain, and as "scsi hostdev" for another domain at the same time.
      That's why this patch renames qemu_driver->sharedDisks. Related functions
      and structs are also renamed.
      539d0e19
    • O
      conf: Introduce <shareable> for hostdev · f2c1d9a8
      Osier Yang 提交于
      Unlike disk device, the scsi-generic always writethrough the data,
      so no need to introduce a "cache" tag, and set "cache=off".
      f2c1d9a8
    • D
      Don't mount selinux fs in LXC if selinux is disabled · 95c6cc34
      Daniel P. Berrange 提交于
      Before trying to mount the selinux filesystem in a container
      use is_selinux_enabled() to check if the machine actually
      has selinux support (eg not booted with selinux=0)
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      95c6cc34
    • D
      Move VirtualBox driver into libvirtd · ba5f3c7c
      Daniel P. Berrange 提交于
      Change the build process & driver initialization so that the
      VirtualBox driver is built into libvirtd, instead of libvirt.so
      This change avoids the VirtualBox GPLv2-only license causing
      compatibility problems with libvirt.so which is under the
      GPLv2-or-later license.
      
      NB this change prevents use of the VirtualBox driver on the
      Windows platform, until such time as libvirtd can be made
      to work there.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ba5f3c7c
    • D
      Fix LXC startup when /var/run is an absolute symlink · d7d7581b
      Daniel P. Berrange 提交于
      During startup, the LXC driver uses paths such as
      
        /.oldroot/var/run/libvirt/lxc/...
      
      to access directories from the previous root filesystem
      after doing a pivot_root(). Unfortunately if /var/run
      is an absolute symlink to /run, instead of a relative
      symlink to ../run, these paths break.
      
      At least one Linux distro is known to use an absolute
      symlink for /var/run, so workaround this, by resolving
      all symlinks before doing the pivot_root().
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d7d7581b
    • O
      conf: Fix the bug of disk->copy_on_read formating · e3b40bec
      Osier Yang 提交于
      The reason for it's not exposed for such long time is that the
      enums for VirtioEventIdx and CopyOnReadType have same enum values
      and Correspondingstrings. This fixes the bug and adds test.
      e3b40bec
    • J
      datatypes: fix virGetStoragePool's comment · d3842cb4
      Ján Tomko 提交于
      d3842cb4
    • J
      daemon: fix leak after listing all volumes · ca697e90
      Ján Tomko 提交于
      CVE-2013-1962
      
      remoteDispatchStoragePoolListAllVolumes wasn't freeing the pool.
      The pool also held a reference to the connection, preventing it from
      getting freed and closing the netcf interface driver, which held two
      sockets open.
      ca697e90
    • V
      qemu: Fix crash in migration of graphics-less guests. · 9684bb11
      Viktor Mihajlovski 提交于
      Commit 7f15ebc7 introduced a bug
      happening when guests without a <graphics> element are migrated.
      The initialization of listenAddress happens unconditionally
      from the cookie even if the cookie->graphics pointer was NULL.
      Moved the initialization to where it is safe.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      9684bb11
    • J
      build: Fix check-driverimpls in VPATH · e13e548f
      Jiri Denemark 提交于
      DRIVER_SOURCE_FILES mixes files with absolute path (inherited from
      REMOTE_DRIVER_GENERATED) with file paths that are relative to srcdir but
      check-driverimpls.pl needs full paths.
      e13e548f
    • J
      util: Fix build without devmapper · c431f065
      Jiri Denemark 提交于
      stdlib.h header file needed for getenv was only transitively included
      through libdevmapper.h.
      c431f065
    • D
      Expand documentation for LXC driver · 41beacd9
      Daniel P. Berrange 提交于
      Update the LXC driver documentation to describe the way
      containers are setup by default. Also describe the common
      virsh commands for managing containers and a little about
      the security. Placeholders for docs about configuring
      containers still to be filled in.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      41beacd9
    • O
      conf: Improve the coding style · a3f600f9
      Osier Yang 提交于
      Add spaces around "<<", and remove the useless blank-line.
      a3f600f9
    • E
      string: test VIR_STRDUP · 504b4a8d
      Eric Blake 提交于
      The surest way to avoid regressions is to test documented behavior :)
      
      * tests/virstringtest.c (testStrdup): New test case.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      504b4a8d
    • G
      virsh: lookup interface by name or mac other than one by one · 36c0a791
      Guannan Ren 提交于
      Use virMacAddrParse() to distinguish interface name from interface
      mac address.
      36c0a791
    • S
      nwfilter: check for inverted ctdir · a6a04ea4
      Stefan Berger 提交于
      Linux netfilter at some point (Linux 2.6.39) inverted the meaning of the
      '--ctdir reply' and newer netfilter implementations now expect
      '--ctdir original' instead and vice-versa.
      We check for the kernel version and assume that all Linux kernels with version
      2.6.39 have the newer inverted logic.
      
      Any distro backporting the Linux kernel patch that inverts the --ctdir logic
      (Linux commit 96120d86f) must also backport this patch for Linux and
      adapt the kernel version being tested for.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      a6a04ea4
    • R
      FreeBSD: disable buggy -fstack-protector-all · cc7cd623
      Roman Bogorodskiy 提交于
      FreeBSD ships an old gcc 4.2.1 which generates
      bogus code, e.g. getsockopt() call returns
      struct xucred with bogus values, which doesn't even
      allow to connect to libvirtd:
      
      error: Failed to find group record for gid '1284660778': No error: 0
      
      So roll back to just -fstack-protector on FreeBSD.
      cc7cd623
    • J
      Adjust improperly formatted <sysinfo> uuid · a2c37618
      John Ferlan 提交于
      If the <sysinfo> system table 'uuid' field is improperly formatted,
      then qemu will fail to start the guest with the error:
      
      virsh start dom
      error: Failed to start domain dom
      error: internal error process exited while connecting to monitor: Invalid SMBIOS UUID string
      
      This was because the parsing rules were lax with respect to allowing extraneous
      spaces and dashes in the provided UUID.  As long as there were 32 hexavalues
      that matched the UUID for the domain the string was accepted. However startup
      failed because the string format wasn't correct. This patch will adjust the
      string format so that when it's presented to the driver it's in the expected
      format.
      
      Added a test for uuid comparison within sysinfo.
      a2c37618
    • J
      Validate the bios_date format for <sysinfo> · 21540f5e
      John Ferlan 提交于
      Add incorrectly formatted bios_date validation test
      21540f5e