Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3d90c2f845 | |||
| 5c3e8a7ac0 | |||
| 09a86187e8 | |||
| a8bac7d647 | |||
| 74d9fb3860 | |||
| 1b3b9bf1cc | |||
| 1d1a47ccaf | |||
| 14f81abaae | |||
| 6b3af81b0e |
+18
@@ -0,0 +1,18 @@
|
||||
.build*.log
|
||||
*.rpm
|
||||
i686
|
||||
x86_64
|
||||
libvirt-*.tar.gz
|
||||
libvirt-0.6.0.tar.gz
|
||||
libvirt-0.6.1.tar.gz
|
||||
libvirt-0.6.2.tar.gz
|
||||
libvirt-0.6.3.tar.gz
|
||||
libvirt-0.6.4.tar.gz
|
||||
libvirt-0.6.5.tar.gz
|
||||
libvirt-0.7.0.tar.gz
|
||||
libvirt-0.7.1.tar.gz
|
||||
libvirt-0.7.2.tar.gz
|
||||
libvirt-0.7.3.tar.gz
|
||||
libvirt-0.7.4.tar.gz
|
||||
libvirt-0.7.5.tar.gz
|
||||
libvirt-0.7.6.tar.gz
|
||||
@@ -1,8 +0,0 @@
|
||||
.build*.log
|
||||
*.rpm
|
||||
i686
|
||||
x86_64
|
||||
libvirt-*.tar.gz
|
||||
/libvirt-0.8.4.tar.gz
|
||||
/libvirt-0.8.5.tar.gz
|
||||
/libvirt-0.8.7.tar.gz
|
||||
@@ -0,0 +1,163 @@
|
||||
commit 377bc412ce10845930346744e30fe9c4790e5e63
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed May 19 16:03:52 2010 -0400
|
||||
|
||||
daemon: Export SDL audio environment variables
|
||||
|
||||
/etc/sysconfig/libvirtd has a few environment variables for configuring
|
||||
libvirt SDL audio. The libvirtd process doesn't see these, however, because
|
||||
they are never exported. Let's export the variables after sourcing the
|
||||
sysconfig script.
|
||||
|
||||
There is another problem here that the commented out values in the
|
||||
sysconfig script are not neccessarily the actual defaults, we are qemus
|
||||
mercy here. Not sure how to solve that.
|
||||
|
||||
diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in
|
||||
index 809433e..aa7870c 100644
|
||||
--- a/daemon/libvirtd.init.in
|
||||
+++ b/daemon/libvirtd.init.in
|
||||
@@ -45,6 +45,9 @@ KRB5_KTNAME=/etc/libvirt/krb5.tab
|
||||
|
||||
test -f @sysconfdir@/sysconfig/libvirtd && . @sysconfdir@/sysconfig/libvirtd
|
||||
|
||||
+export QEMU_AUDIO_DRV
|
||||
+export SDL_AUDIODRIVER
|
||||
+
|
||||
LIBVIRTD_CONFIG_ARGS=
|
||||
if [ -n "$LIBVIRTD_CONFIG" ]
|
||||
then
|
||||
commit 7f44743c524faa493d05eaf026f1e90a807e502b
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed May 26 10:51:36 2010 -0400
|
||||
|
||||
daemon: sysconf: Update comment about VNC audio
|
||||
|
||||
diff --git a/daemon/libvirtd.sysconf b/daemon/libvirtd.sysconf
|
||||
index 28080a0..b730c5e 100644
|
||||
--- a/daemon/libvirtd.sysconf
|
||||
+++ b/daemon/libvirtd.sysconf
|
||||
@@ -11,7 +11,8 @@
|
||||
# Override the QEMU/SDL default audio driver probing when
|
||||
# starting virtual machines using SDL graphics
|
||||
#
|
||||
-# NB these have no effect for VMs using VNC
|
||||
+# NB these have no effect for VMs using VNC, unless vnc_allow_host_audio
|
||||
+# is enabled in /etc/libvirt/qemu.conf
|
||||
#QEMU_AUDIO_DRV=sdl
|
||||
#
|
||||
#SDL_AUDIODRIVER=pulse
|
||||
commit fb3ebd0397980ae035e66f0008b09e13377ef80f
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed May 19 16:41:01 2010 -0400
|
||||
|
||||
qemu: Allow using regular audio backends with VNC
|
||||
|
||||
Currently all host audio backends are disabled if a VM is using VNC, in
|
||||
favor of the QEMU VNC audio extension. Unfortunately no released VNC
|
||||
client supports this extension, so users have no way of getting audio
|
||||
to work if using VNC.
|
||||
|
||||
Add a new config option in qemu.conf which allows changing libvirt's
|
||||
behavior, but keep the default intact.
|
||||
|
||||
v2: Fix doc typos, change name to vnc_allow_host_audio
|
||||
|
||||
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
|
||||
index 5bd60b3..551cc20 100644
|
||||
--- a/src/qemu/libvirtd_qemu.aug
|
||||
+++ b/src/qemu/libvirtd_qemu.aug
|
||||
@@ -38,6 +38,7 @@ module Libvirtd_qemu =
|
||||
| str_entry "save_image_format"
|
||||
| str_entry "hugetlbfs_mount"
|
||||
| bool_entry "relaxed_acs_check"
|
||||
+ | bool_entry "vnc_allow_host_audio"
|
||||
|
||||
(* Each enty in the config is one of the following three ... *)
|
||||
let entry = vnc_entry
|
||||
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
|
||||
index 3da332f..98a1176 100644
|
||||
--- a/src/qemu/qemu.conf
|
||||
+++ b/src/qemu/qemu.conf
|
||||
@@ -168,3 +168,13 @@
|
||||
# be assigned to guests.
|
||||
#
|
||||
# relaxed_acs_check = 1
|
||||
+
|
||||
+
|
||||
+# QEMU implements an extension for providing audio over a VNC connection,
|
||||
+# though if your VNC client does not support it, your only chance for getting
|
||||
+# sound output is through regular audio backends. By default, libvirt will
|
||||
+# disable all QEMU sound backends if using VNC, since they can cause
|
||||
+# permissions issues. Enabling this option will make libvirtd honor the
|
||||
+# QEMU_AUDIO_DRV environment variable when using VNC.
|
||||
+#
|
||||
+# vnc_allow_host_audio = 0
|
||||
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
||||
index 2755545..b4d8e74 100644
|
||||
--- a/src/qemu/qemu_conf.c
|
||||
+++ b/src/qemu/qemu_conf.c
|
||||
@@ -351,6 +351,10 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
|
||||
CHECK_TYPE ("relaxed_acs_check", VIR_CONF_LONG);
|
||||
if (p) driver->relaxedACS = p->l;
|
||||
|
||||
+ p = virConfGetValue (conf, "vnc_allow_host_audio");
|
||||
+ CHECK_TYPE ("vnc_allow_host_audio", VIR_CONF_LONG);
|
||||
+ if (p) driver->vncAllowHostAudio = p->l;
|
||||
+
|
||||
virConfFree (conf);
|
||||
return 0;
|
||||
}
|
||||
@@ -4399,12 +4403,15 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||
ADD_ARG_LIT(def->graphics[0]->data.vnc.keymap);
|
||||
}
|
||||
|
||||
- /* QEMU implements a VNC extension for providing audio, so we
|
||||
- * set the audio backend to none, to prevent it opening the
|
||||
- * host OS audio devices since that causes security issues
|
||||
- * and is non-sensical when using VNC.
|
||||
+ /* Unless user requested it, set the audio backend to none, to
|
||||
+ * prevent it opening the host OS audio devices, since that causes
|
||||
+ * security issues and might not work when using VNC.
|
||||
*/
|
||||
- ADD_ENV_LIT("QEMU_AUDIO_DRV=none");
|
||||
+ if (driver->vncAllowHostAudio) {
|
||||
+ ADD_ENV_COPY("QEMU_AUDIO_DRV");
|
||||
+ } else {
|
||||
+ ADD_ENV_LIT("QEMU_AUDIO_DRV=none");
|
||||
+ }
|
||||
} else if ((def->ngraphics == 1) &&
|
||||
def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_SDL) {
|
||||
char *xauth = NULL;
|
||||
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
|
||||
index 8fd8d79..7fb4de5 100644
|
||||
--- a/src/qemu/qemu_conf.h
|
||||
+++ b/src/qemu/qemu_conf.h
|
||||
@@ -138,6 +138,8 @@ struct qemud_driver {
|
||||
|
||||
unsigned int relaxedACS : 1;
|
||||
|
||||
+ unsigned int vncAllowHostAudio : 1;
|
||||
+
|
||||
virCapsPtr caps;
|
||||
|
||||
/* An array of callbacks */
|
||||
diff --git a/src/qemu/test_libvirtd_qemu.aug b/src/qemu/test_libvirtd_qemu.aug
|
||||
index 2feedc0..a048ae5 100644
|
||||
--- a/src/qemu/test_libvirtd_qemu.aug
|
||||
+++ b/src/qemu/test_libvirtd_qemu.aug
|
||||
@@ -97,6 +97,8 @@ save_image_format = \"gzip\"
|
||||
hugetlbfs_mount = \"/dev/hugepages\"
|
||||
|
||||
relaxed_acs_check = 1
|
||||
+
|
||||
+vnc_allow_host_audio = 1
|
||||
"
|
||||
|
||||
test Libvirtd_qemu.lns get conf =
|
||||
@@ -204,3 +206,5 @@ relaxed_acs_check = 1
|
||||
{ "hugetlbfs_mount" = "/dev/hugepages" }
|
||||
{ "#empty" }
|
||||
{ "relaxed_acs_check" = "1" }
|
||||
+{ "#empty" }
|
||||
+{ "vnc_allow_host_audio" = "1" }
|
||||
@@ -0,0 +1,110 @@
|
||||
diff -rup libvirt-0.7.7/src/qemu/libvirtd_qemu.aug new/src/qemu/libvirtd_qemu.aug
|
||||
--- libvirt-0.7.7/src/qemu/libvirtd_qemu.aug 2010-06-17 12:38:52.998946000 -0400
|
||||
+++ new/src/qemu/libvirtd_qemu.aug 2010-06-17 12:39:28.504148000 -0400
|
||||
@@ -39,6 +39,7 @@ module Libvirtd_qemu =
|
||||
| str_entry "hugetlbfs_mount"
|
||||
| bool_entry "relaxed_acs_check"
|
||||
| bool_entry "vnc_allow_host_audio"
|
||||
+ | bool_entry "clear_emulator_capabilities"
|
||||
|
||||
(* Each enty in the config is one of the following three ... *)
|
||||
let entry = vnc_entry
|
||||
diff -rup libvirt-0.7.7/src/qemu/qemu.conf new/src/qemu/qemu.conf
|
||||
--- libvirt-0.7.7/src/qemu/qemu.conf 2010-06-17 12:38:53.001953000 -0400
|
||||
+++ new/src/qemu/qemu.conf 2010-06-17 12:39:28.508149000 -0400
|
||||
@@ -178,3 +178,12 @@
|
||||
# QEMU_AUDIO_DRV environment variable when using VNC.
|
||||
#
|
||||
# vnc_allow_host_audio = 0
|
||||
+
|
||||
+# If clear_emulator_capabilities is enabled, libvirt will drop all
|
||||
+# privileged capabilities of the QEmu/KVM emulator. This is enabled by
|
||||
+# default.
|
||||
+#
|
||||
+# Warning: Disabling this option means that a compromised guest can
|
||||
+# exploit the privileges and possibly do damage to the host.
|
||||
+#
|
||||
+# clear_emulator_capabilities = 1
|
||||
diff -rup libvirt-0.7.7/src/qemu/qemu_conf.c new/src/qemu/qemu_conf.c
|
||||
--- libvirt-0.7.7/src/qemu/qemu_conf.c 2010-06-17 12:38:53.010946000 -0400
|
||||
+++ new/src/qemu/qemu_conf.c 2010-06-17 12:39:28.526151000 -0400
|
||||
@@ -103,6 +103,7 @@ int qemudLoadDriverConfig(struct qemud_d
|
||||
|
||||
/* Setup critical defaults */
|
||||
driver->dynamicOwnership = 1;
|
||||
+ driver->clearEmulatorCapabilities = 1;
|
||||
|
||||
if (!(driver->vncListen = strdup("127.0.0.1"))) {
|
||||
virReportOOMError();
|
||||
@@ -354,6 +355,10 @@ int qemudLoadDriverConfig(struct qemud_d
|
||||
CHECK_TYPE ("vnc_allow_host_audio", VIR_CONF_LONG);
|
||||
if (p) driver->vncAllowHostAudio = p->l;
|
||||
|
||||
+ p = virConfGetValue (conf, "clear_emulator_capabilities");
|
||||
+ CHECK_TYPE ("clear_emulator_capabilities", VIR_CONF_LONG);
|
||||
+ if (p) driver->clearEmulatorCapabilities = p->l;
|
||||
+
|
||||
virConfFree (conf);
|
||||
return 0;
|
||||
}
|
||||
diff -rup libvirt-0.7.7/src/qemu/qemu_conf.h new/src/qemu/qemu_conf.h
|
||||
--- libvirt-0.7.7/src/qemu/qemu_conf.h 2010-06-17 12:38:53.015945000 -0400
|
||||
+++ new/src/qemu/qemu_conf.h 2010-06-17 12:39:28.531146000 -0400
|
||||
@@ -129,8 +129,8 @@ struct qemud_driver {
|
||||
ebtablesContext *ebtables;
|
||||
|
||||
unsigned int relaxedACS : 1;
|
||||
-
|
||||
unsigned int vncAllowHostAudio : 1;
|
||||
+ unsigned int clearEmulatorCapabilities : 1;
|
||||
|
||||
virCapsPtr caps;
|
||||
|
||||
diff -rup libvirt-0.7.7/src/qemu/qemu_driver.c new/src/qemu/qemu_driver.c
|
||||
--- libvirt-0.7.7/src/qemu/qemu_driver.c 2010-06-17 12:38:52.988953000 -0400
|
||||
+++ new/src/qemu/qemu_driver.c 2010-06-17 12:39:28.542147000 -0400
|
||||
@@ -2699,7 +2699,7 @@ static int qemudStartVMDaemon(virConnect
|
||||
int stdin_fd) {
|
||||
const char **argv = NULL, **tmp;
|
||||
const char **progenv = NULL;
|
||||
- int i, ret;
|
||||
+ int i, ret, runflags;
|
||||
struct stat sb;
|
||||
int *tapfds = NULL;
|
||||
int ntapfds = 0;
|
||||
@@ -2893,9 +2893,16 @@ static int qemudStartVMDaemon(virConnect
|
||||
for (i = 0 ; i < ntapfds ; i++)
|
||||
FD_SET(tapfds[i], &keepfd);
|
||||
|
||||
+ VIR_DEBUG("Clear emulator capabilities: %d",
|
||||
+ driver->clearEmulatorCapabilities);
|
||||
+ runflags = VIR_EXEC_NONBLOCK;
|
||||
+ if (driver->clearEmulatorCapabilities) {
|
||||
+ runflags |= VIR_EXEC_CLEAR_CAPS;
|
||||
+ }
|
||||
+
|
||||
ret = virExecDaemonize(argv, progenv, &keepfd, &child,
|
||||
stdin_fd, &logfile, &logfile,
|
||||
- VIR_EXEC_NONBLOCK | VIR_EXEC_CLEAR_CAPS,
|
||||
+ runflags,
|
||||
qemudSecurityHook, &hookData,
|
||||
pidfile);
|
||||
VIR_FREE(pidfile);
|
||||
diff -rup libvirt-0.7.7/src/qemu/test_libvirtd_qemu.aug new/src/qemu/test_libvirtd_qemu.aug
|
||||
--- libvirt-0.7.7/src/qemu/test_libvirtd_qemu.aug 2010-06-17 12:38:53.018948000 -0400
|
||||
+++ new/src/qemu/test_libvirtd_qemu.aug 2010-06-17 12:39:28.546145000 -0400
|
||||
@@ -99,6 +99,8 @@ hugetlbfs_mount = \"/dev/hugepages\"
|
||||
relaxed_acs_check = 1
|
||||
|
||||
vnc_allow_host_audio = 1
|
||||
+
|
||||
+clear_emulator_capabilities = 0
|
||||
"
|
||||
|
||||
test Libvirtd_qemu.lns get conf =
|
||||
@@ -208,3 +210,5 @@ vnc_allow_host_audio = 1
|
||||
{ "relaxed_acs_check" = "1" }
|
||||
{ "#empty" }
|
||||
{ "vnc_allow_host_audio" = "1" }
|
||||
+{ "#empty" }
|
||||
+{ "clear_emulator_capabilities" = "0" }
|
||||
@@ -0,0 +1,132 @@
|
||||
commit c4896d378b921ba6471562d7b17641be121c19d6
|
||||
Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
Date: Thu Apr 15 11:35:07 2010 +0100
|
||||
|
||||
Fix CDROM media change for QEMU when using -device syntax
|
||||
|
||||
Disk devices in QEMU have two parts, the guest device and the host
|
||||
backend driver. Historically these two parts have had the same
|
||||
"unique" name. With the switch to using -device though, they now
|
||||
have separate names. Thus when changing CDROM media, for guests
|
||||
using -device syntax, we need to prepend the QEMU_DRIVE_HOST_PREFIX
|
||||
constant
|
||||
|
||||
* src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add helper function
|
||||
qemuDeviceDriveHostAlias() for building a host backend alias
|
||||
* src/qemu/qemu_driver.c: Use qemuDeviceDriveHostAlias() to determine
|
||||
the host backend alias for performing eject/change commands in the
|
||||
monitor
|
||||
|
||||
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
|
||||
index 1a8b4aa..0cbedf2 100644
|
||||
--- a/src/qemu/qemu_conf.c
|
||||
+++ b/src/qemu/qemu_conf.c
|
||||
@@ -1699,6 +1699,26 @@ static int qemuAssignDeviceDiskAliasLegacy(virDomainDiskDefPtr disk)
|
||||
}
|
||||
|
||||
|
||||
+char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk,
|
||||
+ unsigned long long qemudCmdFlags)
|
||||
+{
|
||||
+ char *ret;
|
||||
+
|
||||
+ if (qemudCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
|
||||
+ if (virAsprintf(&ret, "%s%s", QEMU_DRIVE_HOST_PREFIX, disk->info.alias) < 0) {
|
||||
+ virReportOOMError();
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (!(ret = strdup(disk->info.alias))) {
|
||||
+ virReportOOMError();
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Names used before -drive supported the id= option */
|
||||
static int qemuAssignDeviceDiskAliasFixed(virDomainDiskDefPtr disk)
|
||||
{
|
||||
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
|
||||
index 574709e..b2820f0 100644
|
||||
--- a/src/qemu/qemu_conf.h
|
||||
+++ b/src/qemu/qemu_conf.h
|
||||
@@ -220,6 +220,9 @@ char * qemuBuildNicStr(virDomainNetDefPtr net,
|
||||
char * qemuBuildNicDevStr(virDomainNetDefPtr net,
|
||||
int vlan);
|
||||
|
||||
+char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk,
|
||||
+ unsigned long long qemudCmdFlags);
|
||||
+
|
||||
/* Both legacy & current support */
|
||||
char *qemuBuildDriveStr(virDomainDiskDefPtr disk,
|
||||
int bootable,
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 0189dcf..7d2f3ef 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -6552,11 +6552,13 @@ cleanup:
|
||||
|
||||
static int qemudDomainChangeEjectableMedia(struct qemud_driver *driver,
|
||||
virDomainObjPtr vm,
|
||||
- virDomainDiskDefPtr disk)
|
||||
+ virDomainDiskDefPtr disk,
|
||||
+ unsigned long long qemuCmdFlags)
|
||||
{
|
||||
virDomainDiskDefPtr origdisk = NULL;
|
||||
int i;
|
||||
int ret;
|
||||
+ char *driveAlias = NULL;
|
||||
|
||||
origdisk = NULL;
|
||||
for (i = 0 ; i < vm->def->ndisks ; i++) {
|
||||
@@ -6594,6 +6596,9 @@ static int qemudDomainChangeEjectableMedia(struct qemud_driver *driver,
|
||||
driver->securityDriver->domainSetSecurityImageLabel(vm, disk) < 0)
|
||||
return -1;
|
||||
|
||||
+ if (!(driveAlias = qemuDeviceDriveHostAlias(origdisk, qemuCmdFlags)))
|
||||
+ goto error;
|
||||
+
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
qemuDomainObjEnterMonitorWithDriver(driver, vm);
|
||||
if (disk->src) {
|
||||
@@ -6605,10 +6610,10 @@ static int qemudDomainChangeEjectableMedia(struct qemud_driver *driver,
|
||||
format = origdisk->driverType;
|
||||
}
|
||||
ret = qemuMonitorChangeMedia(priv->mon,
|
||||
- origdisk->info.alias,
|
||||
+ driveAlias,
|
||||
disk->src, format);
|
||||
} else {
|
||||
- ret = qemuMonitorEjectMedia(priv->mon, origdisk->info.alias);
|
||||
+ ret = qemuMonitorEjectMedia(priv->mon, driveAlias);
|
||||
}
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
|
||||
@@ -6625,11 +6630,14 @@ static int qemudDomainChangeEjectableMedia(struct qemud_driver *driver,
|
||||
disk->src = NULL;
|
||||
origdisk->type = disk->type;
|
||||
|
||||
+ VIR_FREE(driveAlias);
|
||||
+
|
||||
virDomainDiskDefFree(disk);
|
||||
|
||||
return ret;
|
||||
|
||||
error:
|
||||
+ VIR_FREE(driveAlias);
|
||||
if (driver->securityDriver &&
|
||||
driver->securityDriver->domainRestoreSecurityImageLabel &&
|
||||
driver->securityDriver->domainRestoreSecurityImageLabel(vm, disk) < 0)
|
||||
@@ -7434,7 +7442,9 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
|
||||
switch (dev->data.disk->device) {
|
||||
case VIR_DOMAIN_DISK_DEVICE_CDROM:
|
||||
case VIR_DOMAIN_DISK_DEVICE_FLOPPY:
|
||||
- ret = qemudDomainChangeEjectableMedia(driver, vm, dev->data.disk);
|
||||
+ ret = qemudDomainChangeEjectableMedia(driver, vm,
|
||||
+ dev->data.disk,
|
||||
+ qemuCmdFlags);
|
||||
if (ret == 0)
|
||||
dev->data.disk = NULL;
|
||||
break;
|
||||
@@ -0,0 +1,41 @@
|
||||
From e3c36a2575bc88a16d776693dc39ea01c780b406 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Tue, 16 Mar 2010 16:03:59 +0100
|
||||
Subject: [PATCH] Use fsync() at the end of file allocation instead of O_DSYNC
|
||||
|
||||
Instead of opening storage file with O_DSYNC, make sure data are written
|
||||
to a disk only before we claim allocation has finished.
|
||||
---
|
||||
src/storage/storage_backend.c | 9 ++++++++-
|
||||
1 files changed, 8 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
|
||||
index ec9fc43..7294a00 100644
|
||||
--- a/src/storage/storage_backend.c
|
||||
+++ b/src/storage/storage_backend.c
|
||||
@@ -331,6 +331,13 @@ static int createRawFileOpHook(int fd, void *data) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (fsync(fd) < 0) {
|
||||
+ ret = errno;
|
||||
+ virReportSystemError(errno, _("cannot sync data to file '%s'"),
|
||||
+ hdata->vol->target.path);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
}
|
||||
|
||||
cleanup:
|
||||
@@ -359,7 +366,7 @@ virStorageBackendCreateRaw(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
gid_t gid = (vol->target.perms.gid == -1) ? getgid() : vol->target.perms.gid;
|
||||
|
||||
if ((createstat = virFileOperation(vol->target.path,
|
||||
- O_RDWR | O_CREAT | O_EXCL | O_DSYNC,
|
||||
+ O_RDWR | O_CREAT | O_EXCL,
|
||||
vol->target.perms.mode, uid, gid,
|
||||
createRawFileOpHook, &hdata,
|
||||
VIR_FILE_OP_FORCE_PERMS |
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -rup libvirt-0.7.1/src/util/hostusb.c new/src/hostusb.c
|
||||
--- libvirt-0.7.1/src/util/hostusb.c 2010-06-03 13:51:14.392459000 -0400
|
||||
+++ new/src/util/hostusb.c 2010-06-03 14:49:11.763379000 -0400
|
||||
@@ -123,7 +123,7 @@ static int usbFindBusByVendor(virConnect
|
||||
char *tmpstr = de->d_name;
|
||||
unsigned found_bus, found_addr;
|
||||
|
||||
- if (STREQ(de->d_name, "usb"))
|
||||
+ if (STRPREFIX(de->d_name, "usb"))
|
||||
tmpstr += 3;
|
||||
|
||||
if (virStrToLong_ui(tmpstr, &ignore, 10, &found_bus) < 0) {
|
||||
@@ -0,0 +1,233 @@
|
||||
From 3a441522017aa9c1b8b54d2ce4569d0f0d96fa72 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Fri, 12 Mar 2010 12:36:56 -0500
|
||||
Subject: [PATCH] qemu: Add some debugging at domain startup
|
||||
|
||||
---
|
||||
src/qemu/qemu_driver.c | 24 +++++++++++++++++++++++-
|
||||
1 files changed, 23 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index f8ab545..040d645 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -2695,6 +2695,8 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
|
||||
FD_ZERO(&keepfd);
|
||||
|
||||
+ DEBUG0("Beginning VM startup process");
|
||||
+
|
||||
if (virDomainObjIsActive(vm)) {
|
||||
qemuReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("VM is already active"));
|
||||
@@ -2703,22 +2705,27 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
|
||||
/* If you are using a SecurityDriver with dynamic labelling,
|
||||
then generate a security label for isolation */
|
||||
+ DEBUG0("Generating domain security label (if required)");
|
||||
if (driver->securityDriver &&
|
||||
driver->securityDriver->domainGenSecurityLabel &&
|
||||
driver->securityDriver->domainGenSecurityLabel(vm) < 0)
|
||||
return -1;
|
||||
|
||||
+ DEBUG0("Generating setting domain security labels (if required)");
|
||||
if (driver->securityDriver &&
|
||||
driver->securityDriver->domainSetSecurityAllLabel &&
|
||||
driver->securityDriver->domainSetSecurityAllLabel(vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
- /* Ensure no historical cgroup for this VM is lieing around bogus settings */
|
||||
+ /* Ensure no historical cgroup for this VM is lying around bogus
|
||||
+ * settings */
|
||||
+ DEBUG0("Ensuring no historical cgroup is lying around");
|
||||
qemuRemoveCgroup(driver, vm, 1);
|
||||
|
||||
if ((vm->def->ngraphics == 1) &&
|
||||
vm->def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC &&
|
||||
vm->def->graphics[0]->data.vnc.autoport) {
|
||||
+ DEBUG0("Determining VNC port");
|
||||
int port = qemudNextFreeVNCPort(driver);
|
||||
if (port < 0) {
|
||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
@@ -2735,6 +2742,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+ DEBUG0("Creating domain log file");
|
||||
if ((logfile = qemudLogFD(driver, vm->def->name)) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -2751,14 +2759,17 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+ DEBUG0("Determing emulator version");
|
||||
if (qemudExtractVersionInfo(emulator,
|
||||
NULL,
|
||||
&qemuCmdFlags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
+ DEBUG0("Setting up domain cgroup (if required)");
|
||||
if (qemuSetupCgroup(driver, vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
+ DEBUG0("Preparing host devices");
|
||||
if (qemuPrepareHostDevices(driver, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -2767,6 +2778,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+ DEBUG0("Preparing monitor state");
|
||||
if (qemuPrepareMonitorChr(driver, priv->monConfig, vm->def->name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -2798,6 +2810,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
* use in hotplug
|
||||
*/
|
||||
if (qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE) {
|
||||
+ DEBUG0("Assigning domain PCI addresses");
|
||||
/* Populate cache with current addresses */
|
||||
if (priv->pciaddrs) {
|
||||
qemuDomainPCIAddressSetFree(priv->pciaddrs);
|
||||
@@ -2816,6 +2829,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
priv->persistentAddrs = 0;
|
||||
}
|
||||
|
||||
+ DEBUG0("Building emulator command line");
|
||||
vm->def->id = driver->nextvmid++;
|
||||
if (qemudBuildCommandLine(conn, driver, vm->def, priv->monConfig,
|
||||
priv->monJSON, qemuCmdFlags, &argv, &progenv,
|
||||
@@ -2899,25 +2913,31 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
if (ret == -1) /* The VM failed to start */
|
||||
goto cleanup;
|
||||
|
||||
+ DEBUG0("Waiting for monitor to show up");
|
||||
if (qemudWaitForMonitor(driver, vm, pos) < 0)
|
||||
goto abort;
|
||||
|
||||
+ DEBUG0("Detecting VCPU PIDs");
|
||||
if (qemuDetectVcpuPIDs(driver, vm) < 0)
|
||||
goto abort;
|
||||
|
||||
+ DEBUG0("Setting CPU affinity");
|
||||
if (qemudInitCpuAffinity(vm) < 0)
|
||||
goto abort;
|
||||
|
||||
+ DEBUG0("Setting any required VM passwords");
|
||||
if (qemuInitPasswords(conn, driver, vm, qemuCmdFlags) < 0)
|
||||
goto abort;
|
||||
|
||||
/* If we have -device, then addresses are assigned explicitly.
|
||||
* If not, then we have to detect dynamic ones here */
|
||||
if (!(qemuCmdFlags & QEMUD_CMD_FLAG_DEVICE)) {
|
||||
+ DEBUG0("Determining domain device PCI addresses");
|
||||
if (qemuInitPCIAddresses(driver, vm) < 0)
|
||||
goto abort;
|
||||
}
|
||||
|
||||
+ DEBUG0("Setting initial memory amount");
|
||||
qemuDomainObjEnterMonitorWithDriver(driver, vm);
|
||||
if (qemuMonitorSetBalloon(priv->mon, vm->def->memory) < 0) {
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
@@ -2925,6 +2945,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
}
|
||||
|
||||
if (migrateFrom == NULL) {
|
||||
+ DEBUG0("Starting domain CPUs");
|
||||
/* Allow the CPUS to start executing */
|
||||
if (qemuMonitorStartCPUs(priv->mon, conn) < 0) {
|
||||
if (virGetLastError() == NULL)
|
||||
@@ -2937,6 +2958,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
|
||||
|
||||
+ DEBUG0("Writing domain status to disk");
|
||||
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
|
||||
goto abort;
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
From 6d5c8a8f51db8ce97ab35ab6022dd5c94ab016b4 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Fri, 12 Mar 2010 12:37:52 -0500
|
||||
Subject: [PATCH] qemu: Fix USB by product with security enabled
|
||||
|
||||
We need to call PrepareHostdevs to determine the USB device path before
|
||||
any security calls. PrepareHostUSBDevices was also incorrectly skipping
|
||||
all USB devices.
|
||||
---
|
||||
src/qemu/qemu_driver.c | 11 ++++++-----
|
||||
1 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 040d645..b17d26d 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -2360,7 +2360,7 @@ qemuPrepareHostUSBDevices(struct qemud_driver *driver ATTRIBUTE_UNUSED,
|
||||
|
||||
if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS)
|
||||
continue;
|
||||
- if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
|
||||
+ if (hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB)
|
||||
continue;
|
||||
|
||||
/* Resolve a vendor/product to bus/device */
|
||||
@@ -2703,6 +2703,11 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* Must be run before security labelling */
|
||||
+ DEBUG0("Preparing host devices");
|
||||
+ if (qemuPrepareHostDevices(driver, vm->def) < 0)
|
||||
+ goto cleanup;
|
||||
+
|
||||
/* If you are using a SecurityDriver with dynamic labelling,
|
||||
then generate a security label for isolation */
|
||||
DEBUG0("Generating domain security label (if required)");
|
||||
@@ -2769,10 +2774,6 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
||||
if (qemuSetupCgroup(driver, vm) < 0)
|
||||
goto cleanup;
|
||||
|
||||
- DEBUG0("Preparing host devices");
|
||||
- if (qemuPrepareHostDevices(driver, vm->def) < 0)
|
||||
- goto cleanup;
|
||||
-
|
||||
if (VIR_ALLOC(priv->monConfig) < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
From 65e97240e6e4606820dd1c42ac172319e0af4d8d Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon, 22 Mar 2010 10:45:36 -0400
|
||||
Subject: [PATCH] security: selinux: Fix crash when releasing non-existent label
|
||||
|
||||
This can be triggered by the qemuStartVMDaemon cleanup path if a
|
||||
VM references a non-existent USB device (by product) in the XML.
|
||||
|
||||
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||
---
|
||||
src/security/security_selinux.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
|
||||
index 975b315..6680e2d 100644
|
||||
--- a/src/security/security_selinux.c
|
||||
+++ b/src/security/security_selinux.c
|
||||
@@ -632,7 +632,8 @@ SELinuxReleaseSecurityLabel(virDomainObjPtr vm)
|
||||
{
|
||||
const virSecurityLabelDefPtr secdef = &vm->def->seclabel;
|
||||
|
||||
- if (secdef->type == VIR_DOMAIN_SECLABEL_STATIC)
|
||||
+ if (secdef->type == VIR_DOMAIN_SECLABEL_STATIC ||
|
||||
+ secdef->label == NULL)
|
||||
return 0;
|
||||
|
||||
context_t con = context_new(secdef->label);
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
commit 9d0adf249827dde9e1c0d1c19513cf6018ceb34e
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Wed May 19 15:57:56 2010 -0400
|
||||
|
||||
daemon: A few initscript corrections
|
||||
|
||||
Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=565238
|
||||
|
||||
- Avahi service is called 'avahi-daemon'
|
||||
- chkconfig descriptions must use \ for line continuations
|
||||
|
||||
diff --git a/daemon/libvirtd.init.in b/daemon/libvirtd.init.in
|
||||
index d4dc98b..809433e 100644
|
||||
--- a/daemon/libvirtd.init.in
|
||||
+++ b/daemon/libvirtd.init.in
|
||||
@@ -9,7 +9,7 @@
|
||||
# Should-Start: $named
|
||||
# Should-Start: xend
|
||||
# Should-Start: hal
|
||||
-# Should-Start: avahi
|
||||
+# Should-Start: avahi-daemon
|
||||
# Required-Stop: $network messagebus
|
||||
# Should-Stop: $named
|
||||
# Default-Start: 3 4 5
|
||||
@@ -24,8 +24,8 @@
|
||||
# libvirtd: guest and virtual network management daemon
|
||||
#
|
||||
# chkconfig: 345 97 03
|
||||
-# description: This is a daemon for managing guest instances
|
||||
-# and libvirt virtual networks
|
||||
+# description: This is a daemon for managing guest instances \
|
||||
+# and libvirt virtual networks \
|
||||
# See http://libvirt.org
|
||||
#
|
||||
# processname: libvirtd
|
||||
@@ -0,0 +1,65 @@
|
||||
commit e5f31f461f63bbad211e84b810d6ba43a705f9dd
|
||||
Author: Justin Clift <justin@salasaga.org>
|
||||
Date: Sun May 30 13:28:42 2010 +1000
|
||||
|
||||
Trivial virsh.pod additions --all for "list" command and similar
|
||||
|
||||
This is just a trivial patch to virsh.pod (from git master). It adds the
|
||||
following pieces to the virsh man page:
|
||||
|
||||
+ Shows the --inactive and --all optional parameters for the list
|
||||
command.
|
||||
|
||||
Closes Bugzilla #575512, reported by Renich Bon Ciric
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=575512
|
||||
|
||||
+ Corrects the existing description of the list command, to now say
|
||||
that only running domains are listed if no domains are specified.
|
||||
|
||||
The man page up until this point has said all domains are listed if
|
||||
no domains are specified, which is incorrect.
|
||||
|
||||
+ Adds the "shut off" state to the list of states for the list
|
||||
command.
|
||||
|
||||
+ Adds a missing =back around line 755, that pod2man was complaining
|
||||
was missing.
|
||||
|
||||
diff --git a/tools/virsh.pod b/tools/virsh.pod
|
||||
index cf7585d..495bb46 100644
|
||||
--- a/tools/virsh.pod
|
||||
+++ b/tools/virsh.pod
|
||||
@@ -156,10 +156,10 @@ description see:
|
||||
L<http://libvirt.org/formatcaps.html>
|
||||
The XML also show the NUMA topology information if available.
|
||||
|
||||
-=item B<list>
|
||||
+=item B<list> optional I<--inactive> I<--all>
|
||||
|
||||
Prints information about one or more domains. If no domains are
|
||||
-specified it prints out information about all domains.
|
||||
+specified it prints out information about running domains.
|
||||
|
||||
An example format for the list is as follows:
|
||||
|
||||
@@ -177,7 +177,7 @@ State is the run state (see below).
|
||||
|
||||
B<STATES>
|
||||
|
||||
-The State field lists 6 states for a domain, and which ones the
|
||||
+The State field lists 7 states for a domain, and which ones the
|
||||
current domain is in.
|
||||
|
||||
=over 4
|
||||
@@ -205,6 +205,11 @@ The domain is in the process of shutting down, i.e. the guest operating system
|
||||
has been notified and should be in the process of stopping its operations
|
||||
gracefully.
|
||||
|
||||
+=item B<shut off>
|
||||
+
|
||||
+The domain is not running. Usually this indicates the domain has been
|
||||
+shut down completely, or has not been started.
|
||||
+
|
||||
=item B<crashed>
|
||||
|
||||
The domain has crashed, which is always a violent ending. Usually
|
||||
@@ -0,0 +1,169 @@
|
||||
commit a83fe2c23efad190a1e00e448f607fe032650fd6
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Thu May 20 19:31:16 2010 -0400
|
||||
|
||||
network: bridge: Don't start network if it collides with host routing
|
||||
|
||||
Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=235961
|
||||
|
||||
If using the default virtual network, an easy way to lose guest network
|
||||
connectivity is to install libvirt inside the VM. The autostarted
|
||||
default network inside the guest collides with host virtual network
|
||||
routing. This is a long standing issue that has caused users quite a
|
||||
bit of pain and confusion.
|
||||
|
||||
On network startup, parse /proc/net/route and compare the requested
|
||||
IP+netmask against host routing destinations: if any matches are found,
|
||||
refuse to start the network.
|
||||
|
||||
v2: Drop sscanf, fix a comment typo, comment that function could use
|
||||
libnl instead of /proc
|
||||
|
||||
v3: Consider route netmask. Compare binary data rather than convert to
|
||||
string.
|
||||
|
||||
v4: Return to using sscanf, drop inet functions in favor of virSocket,
|
||||
parsing safety checks. Don't make parse failures fatal, in case
|
||||
expected format changes.
|
||||
|
||||
v5: Try and continue if we receive unexpected. Delimit parsed lines to
|
||||
prevent scanning past newline
|
||||
|
||||
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
|
||||
index 5d7ef19..7ab3f3e 100644
|
||||
--- a/src/network/bridge_driver.c
|
||||
+++ b/src/network/bridge_driver.c
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "iptables.h"
|
||||
#include "bridge.h"
|
||||
#include "logging.h"
|
||||
+#include "util/network.h"
|
||||
|
||||
#define NETWORK_PID_DIR LOCAL_STATE_DIR "/run/libvirt/network"
|
||||
#define NETWORK_STATE_DIR LOCAL_STATE_DIR "/lib/libvirt/network"
|
||||
@@ -908,6 +909,114 @@ cleanup:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#define PROC_NET_ROUTE "/proc/net/route"
|
||||
+
|
||||
+/* XXX: This function can be a lot more exhaustive, there are certainly
|
||||
+ * other scenarios where we can ruin host network connectivity.
|
||||
+ * XXX: Using a proper library is preferred over parsing /proc
|
||||
+ */
|
||||
+static int networkCheckRouteCollision(virNetworkObjPtr network)
|
||||
+{
|
||||
+ int ret = -1, len;
|
||||
+ unsigned int net_dest;
|
||||
+ char *cur, *buf = NULL;
|
||||
+ enum {MAX_ROUTE_SIZE = 1024*64};
|
||||
+ virSocketAddr inaddress, innetmask;
|
||||
+
|
||||
+ if (!network->def->ipAddress || !network->def->netmask)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (virSocketParseAddr(network->def->ipAddress, &inaddress, 0) < 0) {
|
||||
+ networkReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("cannot parse IP address '%s'"),
|
||||
+ network->def->ipAddress);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (virSocketParseAddr(network->def->netmask, &innetmask, 0) < 0) {
|
||||
+ networkReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("cannot parse netmask '%s'"),
|
||||
+ network->def->netmask);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
+ if (inaddress.stor.ss_family != AF_INET ||
|
||||
+ innetmask.stor.ss_family != AF_INET) {
|
||||
+ /* Only support collision check for IPv4 */
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ net_dest = (inaddress.inet4.sin_addr.s_addr &
|
||||
+ innetmask.inet4.sin_addr.s_addr);
|
||||
+
|
||||
+ /* Read whole routing table into memory */
|
||||
+ if ((len = virFileReadAll(PROC_NET_ROUTE, MAX_ROUTE_SIZE, &buf)) < 0)
|
||||
+ goto error;
|
||||
+
|
||||
+ /* Dropping the last character shouldn't hurt */
|
||||
+ if (len > 0)
|
||||
+ buf[len-1] = '\0';
|
||||
+
|
||||
+ VIR_DEBUG("%s output:\n%s", PROC_NET_ROUTE, buf);
|
||||
+
|
||||
+ if (!STRPREFIX (buf, "Iface"))
|
||||
+ goto out;
|
||||
+
|
||||
+ /* First line is just headings, skip it */
|
||||
+ cur = strchr(buf, '\n');
|
||||
+ if (cur)
|
||||
+ cur++;
|
||||
+
|
||||
+ while (cur) {
|
||||
+ char iface[17], dest[128], mask[128];
|
||||
+ unsigned int addr_val, mask_val;
|
||||
+ int num;
|
||||
+
|
||||
+ /* NUL-terminate the line, so sscanf doesn't go beyond a newline. */
|
||||
+ char *nl = strchr(cur, '\n');
|
||||
+ if (nl) {
|
||||
+ *nl++ = '\0';
|
||||
+ }
|
||||
+
|
||||
+ num = sscanf(cur, "%16s %127s %*s %*s %*s %*s %*s %127s",
|
||||
+ iface, dest, mask);
|
||||
+ cur = nl;
|
||||
+
|
||||
+ if (num != 3) {
|
||||
+ VIR_DEBUG("Failed to parse %s", PROC_NET_ROUTE);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (virStrToLong_ui(dest, NULL, 16, &addr_val) < 0) {
|
||||
+ VIR_DEBUG("Failed to convert network address %s to uint", dest);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (virStrToLong_ui(mask, NULL, 16, &mask_val) < 0) {
|
||||
+ VIR_DEBUG("Failed to convert network mask %s to uint", mask);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ addr_val &= mask_val;
|
||||
+
|
||||
+ if ((net_dest == addr_val) &&
|
||||
+ (innetmask.inet4.sin_addr.s_addr == mask_val)) {
|
||||
+ networkReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("Network %s/%s is already in use by "
|
||||
+ "interface %s"),
|
||||
+ network->def->ipAddress,
|
||||
+ network->def->netmask, iface);
|
||||
+ goto error;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+out:
|
||||
+ ret = 0;
|
||||
+error:
|
||||
+ VIR_FREE(buf);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static int networkStartNetworkDaemon(struct network_driver *driver,
|
||||
virNetworkObjPtr network)
|
||||
{
|
||||
@@ -919,6 +1028,10 @@ static int networkStartNetworkDaemon(struct network_driver *driver,
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ /* Check to see if network collides with an existing route */
|
||||
+ if (networkCheckRouteCollision(network) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
if ((err = brAddBridge(driver->brctl, network->def->bridge))) {
|
||||
virReportSystemError(err,
|
||||
_("cannot create bridge '%s'"),
|
||||
@@ -0,0 +1,26 @@
|
||||
commit b7a7b3365145f6e9e434a3265a58666cd2e6d8dd
|
||||
Author: Guido Günther <agx@sigxcpu.org>
|
||||
Date: Wed Mar 17 21:04:11 2010 +0100
|
||||
|
||||
Don't crash without a security driver
|
||||
|
||||
"virsh dominfo <vm>" crashes if there's no primary security driver set
|
||||
since we only intialize the secmodel.model and secmodel.doi if we have
|
||||
one. Attached patch checks for securityPrimaryDriver instead of
|
||||
securityDriver since the later is always set in qemudSecurityInit().
|
||||
|
||||
Closes: http://bugs.debian.org/574359
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index 1f2b11d..257f914 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -4979,7 +4979,7 @@ static int qemudNodeGetSecurityModel(virConnectPtr conn,
|
||||
int ret = 0;
|
||||
|
||||
qemuDriverLock(driver);
|
||||
- if (!driver->securityDriver) {
|
||||
+ if (!driver->securityPrimaryDriver) {
|
||||
memset(secmodel, 0, sizeof (*secmodel));
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
commit 74c7a3463d18a530d6d749d0199061b5d3f17faa
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Tue May 11 14:44:34 2010 -0400
|
||||
|
||||
node_device: udev: Fix PCI product/vendor swappage
|
||||
|
||||
Product and vendor values were swapped in the XML, which made virt-manager
|
||||
PCI device listing kinda useless.
|
||||
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index bcfe991..4a9d65f 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -382,8 +382,8 @@ static int udevTranslatePCIIds(unsigned int vendor,
|
||||
|
||||
/* pci_get_strings returns void */
|
||||
pci_get_strings(&m,
|
||||
- &vendor_name,
|
||||
&device_name,
|
||||
+ &vendor_name,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
commit 75d88455f54088f88bc7a503da0a4cd413ef7b95
|
||||
Author: Klaus Ethgen <Klaus@Ethgen.de>
|
||||
Date: Tue Apr 27 09:20:47 2010 +0200
|
||||
|
||||
The base used for conversion of USB values should be 16 not 10.
|
||||
|
||||
Signed-off-by: Guido Günther <agx@sigxcpu.org>
|
||||
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index b12a49e..3a5a7e2 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -548,8 +548,6 @@ out:
|
||||
}
|
||||
|
||||
|
||||
-/* XXX Is 10 the correct base for the Number/Class/SubClass/Protocol
|
||||
- * conversions? */
|
||||
static int udevProcessUSBInterface(struct udev_device *device,
|
||||
virNodeDeviceDefPtr def)
|
||||
{
|
||||
@@ -559,28 +557,28 @@ static int udevProcessUSBInterface(struct udev_device *device,
|
||||
if (udevGetUintSysfsAttr(device,
|
||||
"bInterfaceNumber",
|
||||
&data->usb_if.number,
|
||||
- 10) == PROPERTY_ERROR) {
|
||||
+ 16) == PROPERTY_ERROR) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (udevGetUintSysfsAttr(device,
|
||||
"bInterfaceClass",
|
||||
&data->usb_if._class,
|
||||
- 10) == PROPERTY_ERROR) {
|
||||
+ 16) == PROPERTY_ERROR) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (udevGetUintSysfsAttr(device,
|
||||
"bInterfaceSubClass",
|
||||
&data->usb_if.subclass,
|
||||
- 10) == PROPERTY_ERROR) {
|
||||
+ 16) == PROPERTY_ERROR) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (udevGetUintSysfsAttr(device,
|
||||
"bInterfaceProtocol",
|
||||
&data->usb_if.protocol,
|
||||
- 10) == PROPERTY_ERROR) {
|
||||
+ 16) == PROPERTY_ERROR) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
commit e984019688509605966c03cd77f4591d2cc222d3
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Fri Apr 30 18:14:35 2010 +0200
|
||||
|
||||
domain: Fix PCI address decimal parsing regression
|
||||
|
||||
<hostdev> address parsing previously attempted to detect the number
|
||||
base: currently it is hardcoded to base 16, which can break PCI
|
||||
assignment via virt-manager. Revert to the previous behavior.
|
||||
|
||||
* src/conf/domain_conf.c: virDomainDevicePCIAddressParseXML, switch to
|
||||
virStrToLong_ui(bus, NULL, 0, ...) to autodetect base
|
||||
|
||||
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||
index 1607e8b..546ddf2 100644
|
||||
--- a/src/conf/domain_conf.c
|
||||
+++ b/src/conf/domain_conf.c
|
||||
@@ -1079,28 +1079,28 @@ virDomainDevicePCIAddressParseXML(xmlNodePtr node,
|
||||
function = virXMLPropString(node, "function");
|
||||
|
||||
if (domain &&
|
||||
- virStrToLong_ui(domain, NULL, 16, &addr->domain) < 0) {
|
||||
+ virStrToLong_ui(domain, NULL, 0, &addr->domain) < 0) {
|
||||
virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot parse <address> 'domain' attribute"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (bus &&
|
||||
- virStrToLong_ui(bus, NULL, 16, &addr->bus) < 0) {
|
||||
+ virStrToLong_ui(bus, NULL, 0, &addr->bus) < 0) {
|
||||
virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot parse <address> 'bus' attribute"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (slot &&
|
||||
- virStrToLong_ui(slot, NULL, 16, &addr->slot) < 0) {
|
||||
+ virStrToLong_ui(slot, NULL, 0, &addr->slot) < 0) {
|
||||
virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot parse <address> 'slot' attribute"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (function &&
|
||||
- virStrToLong_ui(function, NULL, 16, &addr->function) < 0) {
|
||||
+ virStrToLong_ui(function, NULL, 0, &addr->function) < 0) {
|
||||
virDomainReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Cannot parse <address> 'function' attribute"));
|
||||
goto cleanup;
|
||||
@@ -0,0 +1,108 @@
|
||||
commit 83be64034a0b530c904ceb4fd1ed1c10b5cdf4bf
|
||||
Author: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Mon May 17 10:15:53 2010 -0400
|
||||
|
||||
qemu: Report cmdline output if VM dies early
|
||||
|
||||
qemuReadLogOutput early VM death detection is racy and won't always work.
|
||||
Startup then errors when connecting to the VM monitor. This won't report
|
||||
the emulator cmdline output which is typically the most useful diagnostic.
|
||||
|
||||
Check if the VM has died at the very end of the monitor connection step,
|
||||
and if so, report the cmdline output.
|
||||
|
||||
See also: https://bugzilla.redhat.com/show_bug.cgi?id=581381
|
||||
|
||||
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
||||
index ab6bec8..582fdee 100644
|
||||
--- a/src/qemu/qemu_driver.c
|
||||
+++ b/src/qemu/qemu_driver.c
|
||||
@@ -2034,39 +2034,47 @@ static void qemudFreePtyPath(void *payload, const char *name ATTRIBUTE_UNUSED)
|
||||
VIR_FREE(payload);
|
||||
}
|
||||
|
||||
+static void
|
||||
+qemuReadLogFD(int logfd, char *buf, int maxlen, int off)
|
||||
+{
|
||||
+ int ret;
|
||||
+ char *tmpbuf = buf + off;
|
||||
+
|
||||
+ ret = saferead(logfd, tmpbuf, maxlen - off - 1);
|
||||
+ if (ret < 0) {
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+
|
||||
+ tmpbuf[ret] = '\0';
|
||||
+}
|
||||
+
|
||||
static int
|
||||
qemudWaitForMonitor(struct qemud_driver* driver,
|
||||
virDomainObjPtr vm, off_t pos)
|
||||
{
|
||||
- char buf[4096]; /* Plenty of space to get startup greeting */
|
||||
+ char buf[4096] = ""; /* Plenty of space to get startup greeting */
|
||||
int logfd;
|
||||
int ret = -1;
|
||||
+ virHashTablePtr paths = NULL;
|
||||
|
||||
- if ((logfd = qemudLogReadFD(driver->logDir, vm->def->name, pos))
|
||||
- < 0)
|
||||
+ if ((logfd = qemudLogReadFD(driver->logDir, vm->def->name, pos)) < 0)
|
||||
return -1;
|
||||
|
||||
- ret = qemudReadLogOutput(vm, logfd, buf, sizeof(buf),
|
||||
- qemudFindCharDevicePTYs,
|
||||
- "console", 30);
|
||||
- if (close(logfd) < 0) {
|
||||
- char ebuf[4096];
|
||||
- VIR_WARN(_("Unable to close logfile: %s"),
|
||||
- virStrerror(errno, ebuf, sizeof ebuf));
|
||||
- }
|
||||
-
|
||||
- if (ret < 0)
|
||||
- return -1;
|
||||
+ if (qemudReadLogOutput(vm, logfd, buf, sizeof(buf),
|
||||
+ qemudFindCharDevicePTYs,
|
||||
+ "console", 30) < 0)
|
||||
+ goto closelog;
|
||||
|
||||
VIR_DEBUG("Connect monitor to %p '%s'", vm, vm->def->name);
|
||||
- if (qemuConnectMonitor(driver, vm) < 0)
|
||||
- return -1;
|
||||
+ if (qemuConnectMonitor(driver, vm) < 0) {
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
|
||||
/* Try to get the pty path mappings again via the monitor. This is much more
|
||||
* reliable if it's available.
|
||||
* Note that the monitor itself can be on a pty, so we still need to try the
|
||||
* log output method. */
|
||||
- virHashTablePtr paths = virHashCreate(0);
|
||||
+ paths = virHashCreate(0);
|
||||
if (paths == NULL) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
@@ -2087,6 +2095,23 @@ cleanup:
|
||||
virHashFree(paths, qemudFreePtyPath);
|
||||
}
|
||||
|
||||
+ if (kill(vm->pid, 0) == -1 && errno == ESRCH) {
|
||||
+ /* VM is dead, any other error raised in the interim is probably
|
||||
+ * not as important as the qemu cmdline output */
|
||||
+ qemuReadLogFD(logfd, buf, sizeof(buf), strlen(buf));
|
||||
+ qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("process exited while connecting to monitor: %s"),
|
||||
+ buf);
|
||||
+ ret = -1;
|
||||
+ }
|
||||
+
|
||||
+closelog:
|
||||
+ if (close(logfd) < 0) {
|
||||
+ char ebuf[4096];
|
||||
+ VIR_WARN(_("Unable to close logfile: %s"),
|
||||
+ virStrerror(errno, ebuf, sizeof ebuf));
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
diff -rup libvirt-0.7.7/src/conf/storage_conf.c new/src/conf/storage_conf.c
|
||||
--- libvirt-0.7.7/src/conf/storage_conf.c 2010-03-05 09:46:29.000000000 -0500
|
||||
+++ new/src/conf/storage_conf.c 2010-06-17 12:28:44.319588000 -0400
|
||||
@@ -601,6 +601,7 @@ virStoragePoolDefParseXML(xmlXPathContex
|
||||
xmlNodePtr source_node;
|
||||
char *type = NULL;
|
||||
char *uuid = NULL;
|
||||
+ char *tmppath;
|
||||
|
||||
if (VIR_ALLOC(ret) < 0) {
|
||||
virReportOOMError();
|
||||
@@ -698,11 +699,16 @@ virStoragePoolDefParseXML(xmlXPathContex
|
||||
}
|
||||
}
|
||||
|
||||
- if ((ret->target.path = virXPathString("string(./target/path)", ctxt)) == NULL) {
|
||||
+ if ((tmppath = virXPathString("string(./target/path)", ctxt)) == NULL) {
|
||||
virStorageReportError(VIR_ERR_XML_ERROR,
|
||||
"%s", _("missing storage pool target path"));
|
||||
goto cleanup;
|
||||
}
|
||||
+ ret->target.path = virFileSanitizePath(tmppath);
|
||||
+ VIR_FREE(tmppath);
|
||||
+ if (!ret->target.path)
|
||||
+ goto cleanup;
|
||||
+
|
||||
|
||||
if (virStorageDefParsePerms(ctxt, &ret->target.perms,
|
||||
"./target/permissions", 0700) < 0)
|
||||
diff -rup libvirt-0.7.7/src/libvirt_private.syms new/src/libvirt_private.syms
|
||||
--- libvirt-0.7.7/src/libvirt_private.syms 2010-03-05 10:45:23.000000000 -0500
|
||||
+++ new/src/libvirt_private.syms 2010-06-17 12:28:44.334585000 -0400
|
||||
@@ -582,6 +582,7 @@ virFileReadLimFD;
|
||||
virFilePid;
|
||||
virFileReadPid;
|
||||
virFileLinkPointsTo;
|
||||
+virFileSanitizePath;
|
||||
virParseNumber;
|
||||
virAsprintf;
|
||||
virRun;
|
||||
diff -rup libvirt-0.7.7/src/storage/storage_driver.c new/src/storage/storage_driver.c
|
||||
--- libvirt-0.7.7/src/storage/storage_driver.c 2010-03-05 09:46:29.000000000 -0500
|
||||
+++ new/src/storage/storage_driver.c 2010-06-17 12:28:44.346586000 -0400
|
||||
@@ -1200,6 +1200,11 @@ storageVolumeLookupByPath(virConnectPtr
|
||||
virStorageDriverStatePtr driver = conn->storagePrivateData;
|
||||
unsigned int i;
|
||||
virStorageVolPtr ret = NULL;
|
||||
+ char *cleanpath;
|
||||
+
|
||||
+ cleanpath = virFileSanitizePath(path);
|
||||
+ if (!cleanpath)
|
||||
+ return NULL;
|
||||
|
||||
storageDriverLock(driver);
|
||||
for (i = 0 ; i < driver->pools.count && !ret ; i++) {
|
||||
@@ -1209,7 +1214,7 @@ storageVolumeLookupByPath(virConnectPtr
|
||||
const char *stable_path;
|
||||
|
||||
stable_path = virStorageBackendStablePath(driver->pools.objs[i],
|
||||
- path);
|
||||
+ cleanpath);
|
||||
/*
|
||||
* virStorageBackendStablePath already does
|
||||
* virStorageReportError if it fails; we just need to keep
|
||||
@@ -1238,6 +1243,7 @@ storageVolumeLookupByPath(virConnectPtr
|
||||
"%s", _("no storage vol with matching path"));
|
||||
|
||||
cleanup:
|
||||
+ VIR_FREE(cleanpath);
|
||||
storageDriverUnlock(driver);
|
||||
return ret;
|
||||
}
|
||||
diff -rup libvirt-0.7.7/src/util/util.c new/src/util/util.c
|
||||
--- libvirt-0.7.7/src/util/util.c 2010-03-03 05:48:25.000000000 -0500
|
||||
+++ new/src/util/util.c 2010-06-17 12:28:44.357588000 -0400
|
||||
@@ -1867,6 +1867,55 @@ int virFileAbsPath(const char *path, cha
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/* Remove spurious / characters from a path. The result must be freed */
|
||||
+char *
|
||||
+virFileSanitizePath(const char *path)
|
||||
+{
|
||||
+ const char *cur = path;
|
||||
+ char *cleanpath;
|
||||
+ int idx = 0;
|
||||
+
|
||||
+ cleanpath = strdup(path);
|
||||
+ if (!cleanpath) {
|
||||
+ virReportOOMError();
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ /* Need to sanitize:
|
||||
+ * // -> //
|
||||
+ * /// -> /
|
||||
+ * /../foo -> /../foo
|
||||
+ * /foo///bar/ -> /foo/bar
|
||||
+ */
|
||||
+
|
||||
+ /* Starting with // is valid posix, but ///foo == /foo */
|
||||
+ if (cur[0] == '/' && cur[1] == '/' && cur[2] != '/') {
|
||||
+ idx = 2;
|
||||
+ cur += 2;
|
||||
+ }
|
||||
+
|
||||
+ /* Sanitize path in place */
|
||||
+ while (*cur != '\0') {
|
||||
+ if (*cur != '/') {
|
||||
+ cleanpath[idx++] = *cur++;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /* Skip all extra / */
|
||||
+ while (*++cur == '/')
|
||||
+ continue;
|
||||
+
|
||||
+ /* Don't add a trailing / */
|
||||
+ if (idx != 0 && *cur == '\0')
|
||||
+ break;
|
||||
+
|
||||
+ cleanpath[idx++] = '/';
|
||||
+ }
|
||||
+ cleanpath[idx] = '\0';
|
||||
+
|
||||
+ return cleanpath;
|
||||
+}
|
||||
+
|
||||
/* Like strtol, but produce an "int" result, and check more carefully.
|
||||
Return 0 upon success; return -1 to indicate failure.
|
||||
When END_PTR is NULL, the byte after the final valid digit must be NUL.
|
||||
diff -rup libvirt-0.7.7/src/util/util.h new/src/util/util.h
|
||||
--- libvirt-0.7.7/src/util/util.h 2010-02-19 12:14:07.000000000 -0500
|
||||
+++ new/src/util/util.h 2010-06-17 12:28:44.364585000 -0400
|
||||
@@ -109,6 +109,8 @@ char *virFindFileInPath(const char *file
|
||||
|
||||
int virFileExists(const char *path);
|
||||
|
||||
+char *virFileSanitizePath(const char *path);
|
||||
+
|
||||
enum {
|
||||
VIR_FILE_OP_NONE = 0,
|
||||
VIR_FILE_OP_AS_UID = (1 << 0),
|
||||
diff -rup libvirt-0.7.7/tests/storagepoolxml2xmlin/pool-dir.xml new/tests/storagepoolxml2xmlin/pool-dir.xml
|
||||
--- libvirt-0.7.7/tests/storagepoolxml2xmlin/pool-dir.xml 2009-12-22 04:37:57.000000000 -0500
|
||||
+++ new/tests/storagepoolxml2xmlin/pool-dir.xml 2010-06-17 12:28:44.367585000 -0400
|
||||
@@ -7,7 +7,7 @@
|
||||
<source>
|
||||
</source>
|
||||
<target>
|
||||
- <path>/var/lib/libvirt/images</path>
|
||||
+ <path>///var/////lib/libvirt/images//</path>
|
||||
<permissions>
|
||||
<mode>0700</mode>
|
||||
<owner>0</owner>
|
||||
@@ -0,0 +1,87 @@
|
||||
From 3f1aa08af6580c215d973bc6bf57f505dbf8b926 Mon Sep 17 00:00:00 2001
|
||||
From: Cole Robinson <crobinso@redhat.com>
|
||||
Date: Fri, 12 Mar 2010 13:38:39 -0500
|
||||
Subject: [PATCH] security: Set permissions for kernel/initrd
|
||||
|
||||
Fixes URL installs when running virt-install as root on Fedora.
|
||||
---
|
||||
src/qemu/qemu_security_dac.c | 21 +++++++++++++++++++++
|
||||
src/security/security_selinux.c | 16 ++++++++++++++++
|
||||
2 files changed, 37 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/qemu/qemu_security_dac.c b/src/qemu/qemu_security_dac.c
|
||||
index 6911f48..1883fbe 100644
|
||||
--- a/src/qemu/qemu_security_dac.c
|
||||
+++ b/src/qemu/qemu_security_dac.c
|
||||
@@ -332,6 +332,15 @@ qemuSecurityDACRestoreSecurityAllLabel(virDomainObjPtr vm)
|
||||
vm->def->disks[i]) < 0)
|
||||
rc = -1;
|
||||
}
|
||||
+
|
||||
+ if (vm->def->os.kernel &&
|
||||
+ qemuSecurityDACRestoreSecurityFileLabel(vm->def->os.kernel) < 0)
|
||||
+ rc = -1;
|
||||
+
|
||||
+ if (vm->def->os.initrd &&
|
||||
+ qemuSecurityDACRestoreSecurityFileLabel(vm->def->os.initrd) < 0)
|
||||
+ rc = -1;
|
||||
+
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -356,6 +365,18 @@ qemuSecurityDACSetSecurityAllLabel(virDomainObjPtr vm)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (vm->def->os.kernel &&
|
||||
+ qemuSecurityDACSetOwnership(vm->def->os.kernel,
|
||||
+ driver->user,
|
||||
+ driver->group) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (vm->def->os.initrd &&
|
||||
+ qemuSecurityDACSetOwnership(vm->def->os.initrd,
|
||||
+ driver->user,
|
||||
+ driver->group) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
|
||||
index b2c8581..975b315 100644
|
||||
--- a/src/security/security_selinux.c
|
||||
+++ b/src/security/security_selinux.c
|
||||
@@ -616,6 +616,14 @@ SELinuxRestoreSecurityAllLabel(virDomainObjPtr vm)
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
+ if (vm->def->os.kernel &&
|
||||
+ SELinuxRestoreSecurityFileLabel(vm->def->os.kernel) < 0)
|
||||
+ rc = -1;
|
||||
+
|
||||
+ if (vm->def->os.initrd &&
|
||||
+ SELinuxRestoreSecurityFileLabel(vm->def->os.initrd) < 0)
|
||||
+ rc = -1;
|
||||
+
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -736,6 +744,14 @@ SELinuxSetSecurityAllLabel(virDomainObjPtr vm)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (vm->def->os.kernel &&
|
||||
+ SELinuxSetFilecon(vm->def->os.kernel, default_content_context) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (vm->def->os.initrd &&
|
||||
+ SELinuxSetFilecon(vm->def->os.initrd, default_content_context) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
commit 07f6c3a95f1caca368c8723b5b0a25ae2faa1ffe
|
||||
Author: David Allan <dallan@redhat.com>
|
||||
Date: Thu May 27 10:44:02 2010 -0400
|
||||
|
||||
v2 of Cole's wlan support
|
||||
|
||||
* Incorporated Jim's feedback (v1 & v2)
|
||||
|
||||
* Moved case of DEVTYPE == "wlan" up as it's definitive that we have a network interface.
|
||||
|
||||
* Made comment more detailed about the wired case to explain better
|
||||
how it differentiates between wired network interfaces and USB
|
||||
devices.
|
||||
|
||||
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
|
||||
index f0485f1..c437861 100644
|
||||
--- a/src/node_device/node_device_udev.c
|
||||
+++ b/src/node_device/node_device_udev.c
|
||||
@@ -597,8 +597,15 @@ static int udevProcessNetworkInterface(struct udev_device *device,
|
||||
virNodeDeviceDefPtr def)
|
||||
{
|
||||
int ret = -1;
|
||||
+ const char *devtype = udev_device_get_devtype(device);
|
||||
union _virNodeDevCapData *data = &def->caps->data;
|
||||
|
||||
+ if (devtype && STREQ(devtype, "wlan")) {
|
||||
+ data->net.subtype = VIR_NODE_DEV_CAP_NET_80211;
|
||||
+ } else {
|
||||
+ data->net.subtype = VIR_NODE_DEV_CAP_NET_80203;
|
||||
+ }
|
||||
+
|
||||
if (udevGetStringProperty(device,
|
||||
"INTERFACE",
|
||||
&data->net.ifname) == PROPERTY_ERROR) {
|
||||
@@ -1074,6 +1081,8 @@ static int udevGetDeviceType(struct udev_device *device,
|
||||
int ret = 0;
|
||||
|
||||
devtype = udev_device_get_devtype(device);
|
||||
+ VIR_DEBUG("Found device type '%s' for device '%s'",
|
||||
+ NULLSTR(devtype), udev_device_get_sysname(device));
|
||||
|
||||
if (devtype != NULL && STREQ(devtype, "usb_device")) {
|
||||
*type = VIR_NODE_DEV_CAP_USB_DEV;
|
||||
@@ -1105,13 +1114,20 @@ static int udevGetDeviceType(struct udev_device *device,
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ if (devtype != NULL && STREQ(devtype, "wlan")) {
|
||||
+ *type = VIR_NODE_DEV_CAP_NET;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
if (udevGetUintProperty(device, "PCI_CLASS", &tmp, 16) == PROPERTY_FOUND) {
|
||||
*type = VIR_NODE_DEV_CAP_PCI_DEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
- /* It does not appear that network interfaces set the device type
|
||||
- * property. */
|
||||
+ /* It does not appear that wired network interfaces set the
|
||||
+ * DEVTYPE property. USB devices also have an INTERFACE property,
|
||||
+ * but they do set DEVTYPE, so if devtype is NULL and the
|
||||
+ * INTERFACE property exists, we have a network device. */
|
||||
if (devtype == NULL &&
|
||||
udevGetStringProperty(device,
|
||||
"INTERFACE",
|
||||
@@ -1,40 +0,0 @@
|
||||
From e03899ff772cb753f02ecc99c81776a95c8e3d59 Mon Sep 17 00:00:00 2001
|
||||
From: Osier Yang <jyang@redhat.com>
|
||||
Date: Fri, 18 Feb 2011 13:45:13 +0800
|
||||
Subject: [PATCH 2/6] Requires gettext for client package
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=680270
|
||||
libvirt-client is missing some dependencies
|
||||
|
||||
libvirt-guests invokes functions in gettext.sh, so we need to
|
||||
require gettext package in spec file.
|
||||
|
||||
Demo with the fix:
|
||||
% rpm -q gettext
|
||||
package gettext is not installed
|
||||
|
||||
% rpm -ivh libvirt-client-0.8.8-1.fc14.x86_64.rpm
|
||||
error: Failed dependencies:
|
||||
gettext is needed by libvirt-client-0.8.8-1.fc14.x86_64
|
||||
|
||||
* libvirt.spec.in
|
||||
---
|
||||
libvirt.spec.in | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libvirt.spec.in b/libvirt.spec.in
|
||||
index d4208e8..c08b186 100644
|
||||
--- a/libvirt.spec.in
|
||||
+++ b/libvirt.spec.in
|
||||
@@ -415,6 +415,8 @@ Requires: ncurses
|
||||
# So remote clients can access libvirt over SSH tunnel
|
||||
# (client invokes 'nc' against the UNIX socket on the server)
|
||||
Requires: nc
|
||||
+# Needed by libvirt-guests init script.
|
||||
+Requires: gettext
|
||||
%if %{with_sasl}
|
||||
Requires: cyrus-sasl
|
||||
# Not technically required, but makes 'out-of-box' config
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
From 2c2ae4c48c7e57fd233f1b9475fb6ecbab04804a Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Denemark <jdenemar@redhat.com>
|
||||
Date: Fri, 25 Mar 2011 16:45:45 +0100
|
||||
Subject: [PATCH 2/2] daemon: Avoid resetting errors before they are reported
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=690733
|
||||
|
||||
Commit f44bfb7 was supposed to make sure no additional libvirt API (esp.
|
||||
*Free) is called before remoteDispatchConnError() is called on error.
|
||||
However, the patch missed two instances.
|
||||
(cherry picked from commit 55cc591fc18e87b29febf78dc5b424b7c12f7349)
|
||||
---
|
||||
daemon/remote.c | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/daemon/remote.c b/daemon/remote.c
|
||||
index 554e75e..159430e 100644
|
||||
--- a/daemon/remote.c
|
||||
+++ b/daemon/remote.c
|
||||
@@ -4868,12 +4868,13 @@ remoteDispatchStoragePoolListVolumes (struct qemud_server *server ATTRIBUTE_UNUS
|
||||
ret->names.names_len =
|
||||
virStoragePoolListVolumes (pool,
|
||||
ret->names.names_val, args->maxnames);
|
||||
- virStoragePoolFree(pool);
|
||||
if (ret->names.names_len == -1) {
|
||||
VIR_FREE(ret->names.names_val);
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
+ virStoragePoolFree(pool);
|
||||
return -1;
|
||||
}
|
||||
+ virStoragePoolFree(pool);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4897,11 +4898,12 @@ remoteDispatchStoragePoolNumOfVolumes (struct qemud_server *server ATTRIBUTE_UNU
|
||||
}
|
||||
|
||||
ret->num = virStoragePoolNumOfVolumes (pool);
|
||||
- virStoragePoolFree(pool);
|
||||
if (ret->num == -1) {
|
||||
remoteDispatchConnError(rerr, conn);
|
||||
+ virStoragePoolFree(pool);
|
||||
return -1;
|
||||
}
|
||||
+ virStoragePoolFree(pool);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From 29680e00f67bad9145387022ea0d3c307465d3dc Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Mon, 21 Feb 2011 10:43:29 -0700
|
||||
Subject: [PATCH 4/6] build: add dependency on gnutls-utils
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=680270
|
||||
libvirt-client is missing some dependencies
|
||||
|
||||
* libvirt.spec.in (Requires): Add gnutls-utils, for virt-pki-validate.
|
||||
Suggested by Daniel P. Berrange.
|
||||
---
|
||||
libvirt.spec.in | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libvirt.spec.in b/libvirt.spec.in
|
||||
index c08b186..23f4525 100644
|
||||
--- a/libvirt.spec.in
|
||||
+++ b/libvirt.spec.in
|
||||
@@ -417,6 +417,8 @@ Requires: ncurses
|
||||
Requires: nc
|
||||
# Needed by libvirt-guests init script.
|
||||
Requires: gettext
|
||||
+# Needed by virt-pki-validate script.
|
||||
+Requires: gnutls-utils
|
||||
%if %{with_sasl}
|
||||
Requires: cyrus-sasl
|
||||
# Not technically required, but makes 'out-of-box' config
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
commit efc2594b4e0cbcdd6947fafeeed41accd5b611e0
|
||||
Author: Jim Fehlig <jfehlig@novell.com>
|
||||
Date: Thu Feb 17 14:22:55 2011 -0700
|
||||
|
||||
Do not add drive 'boot=on' param when a kernel is specified
|
||||
|
||||
libvirt-tck was failing several domain tests [1] with qemu 0.14, which
|
||||
is now less tolerable of specifying 2 bootroms with the same boot index [2].
|
||||
|
||||
Drop the 'boot=on' param if kernel has been specfied.
|
||||
|
||||
[1] https://www.redhat.com/archives/libvir-list/2011-February/msg00559.html
|
||||
[2] http://lists.nongnu.org/archive/html/qemu-devel/2011-02/msg01892.html
|
||||
|
||||
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||
index 371a7ed..0db2843 100644
|
||||
--- a/src/qemu/qemu_command.c
|
||||
+++ b/src/qemu/qemu_command.c
|
||||
@@ -3173,7 +3173,7 @@ qemuBuildCommandLine(virConnectPtr conn,
|
||||
int bootCD = 0, bootFloppy = 0, bootDisk = 0;
|
||||
|
||||
/* If QEMU supports boot=on for -drive param... */
|
||||
- if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_BOOT) {
|
||||
+ if (qemuCmdFlags & QEMUD_CMD_FLAG_DRIVE_BOOT && !def->os.kernel) {
|
||||
for (i = 0 ; i < def->os.nBootDevs ; i++) {
|
||||
switch (def->os.bootDevs[i]) {
|
||||
case VIR_DOMAIN_BOOT_CDROM:
|
||||
@@ -1,32 +0,0 @@
|
||||
From 12509c09a55bd2ab171f9fa029fb94f297adc0a0 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel P. Berrange <berrange@redhat.com>
|
||||
Date: Thu, 24 Feb 2011 12:12:27 +0000
|
||||
Subject: [PATCH] Make commandtest more robust wrt its execution environment
|
||||
|
||||
When executed from cron, commandtest would fail to correctly
|
||||
identify daemon processes. Set session ID and process group
|
||||
IDs at startup to ensure we have a consistent environment to
|
||||
run in.
|
||||
|
||||
* tests/commandtest.c: Call setsid() and setpgid()
|
||||
---
|
||||
tests/commandtest.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/tests/commandtest.c b/tests/commandtest.c
|
||||
index 7157c51..dc2f8a1 100644
|
||||
--- a/tests/commandtest.c
|
||||
+++ b/tests/commandtest.c
|
||||
@@ -730,6 +730,9 @@ mymain(int argc, char **argv)
|
||||
if (chdir("/tmp") < 0)
|
||||
return(EXIT_FAILURE);
|
||||
|
||||
+ setpgid(0, 0);
|
||||
+ setsid();
|
||||
+
|
||||
/* Kill off any inherited fds that might interfere with our
|
||||
* testing. */
|
||||
fd = 3;
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
From: Guido Günther <agx@sigxcpu.org>
|
||||
Date: Mon, 14 Mar 2011 02:56:28 +0000 (+0800)
|
||||
Subject: Add missing checks for read only connections
|
||||
X-Git-Url: http://libvirt.org/git/?p=libvirt.git;a=commitdiff_plain;h=71753cb7f7a16ff800381c0b5ee4e99eea92fed3;hp=13c00dde3171b3a38d23cceb3f9151cb6cac3dad
|
||||
|
||||
Add missing checks for read only connections
|
||||
|
||||
As pointed on CVE-2011-1146, some API forgot to check the read-only
|
||||
status of the connection for entry point which modify the state
|
||||
of the system or may lead to a remote execution using user data.
|
||||
The entry points concerned are:
|
||||
- virConnectDomainXMLToNative
|
||||
- virNodeDeviceDettach
|
||||
- virNodeDeviceReAttach
|
||||
- virNodeDeviceReset
|
||||
- virDomainRevertToSnapshot
|
||||
- virDomainSnapshotDelete
|
||||
|
||||
* src/libvirt.c: fix the above set of entry points to error on read-only
|
||||
connections
|
||||
---
|
||||
|
||||
diff --git a/src/libvirt.c b/src/libvirt.c
|
||||
index caa109d..713291f 100644
|
||||
--- a/src/libvirt.c
|
||||
+++ b/src/libvirt.c
|
||||
@@ -3321,6 +3321,10 @@ char *virConnectDomainXMLToNative(virConnectPtr conn,
|
||||
virDispatchError(NULL);
|
||||
return NULL;
|
||||
}
|
||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibDomainError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
|
||||
if (nativeFormat == NULL || domainXml == NULL) {
|
||||
virLibConnError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
@@ -9748,6 +9752,11 @@ virNodeDeviceDettach(virNodeDevicePtr dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
if (dev->conn->driver->nodeDeviceDettach) {
|
||||
int ret;
|
||||
ret = dev->conn->driver->nodeDeviceDettach (dev);
|
||||
@@ -9791,6 +9800,11 @@ virNodeDeviceReAttach(virNodeDevicePtr dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
if (dev->conn->driver->nodeDeviceReAttach) {
|
||||
int ret;
|
||||
ret = dev->conn->driver->nodeDeviceReAttach (dev);
|
||||
@@ -9836,6 +9850,11 @@ virNodeDeviceReset(virNodeDevicePtr dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ if (dev->conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
+
|
||||
if (dev->conn->driver->nodeDeviceReset) {
|
||||
int ret;
|
||||
ret = dev->conn->driver->nodeDeviceReset (dev);
|
||||
@@ -13131,6 +13150,10 @@ virDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
|
||||
}
|
||||
|
||||
conn = snapshot->domain->conn;
|
||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
|
||||
if (conn->driver->domainRevertToSnapshot) {
|
||||
int ret = conn->driver->domainRevertToSnapshot(snapshot, flags);
|
||||
@@ -13177,6 +13200,10 @@ virDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
|
||||
}
|
||||
|
||||
conn = snapshot->domain->conn;
|
||||
+ if (conn->flags & VIR_CONNECT_RO) {
|
||||
+ virLibConnError(VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
+ goto error;
|
||||
+ }
|
||||
|
||||
if (conn->driver->domainSnapshotDelete) {
|
||||
int ret = conn->driver->domainSnapshotDelete(snapshot, flags);
|
||||
@@ -1,115 +0,0 @@
|
||||
From 9388aeabcbb06ec93845b6d066148ad4cfe1dd9e Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Fri, 24 Jun 2011 12:16:05 -0600
|
||||
Subject: [PATCH 6/6] remote: protect against integer overflow
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=717204
|
||||
CVE-2011-2511 - integer overflow in VirDomainGetVcpus
|
||||
|
||||
Integer overflow and remote code are never a nice mix.
|
||||
|
||||
This has existed since commit 56cd414.
|
||||
|
||||
* src/libvirt.c (virDomainGetVcpus): Reject overflow up front.
|
||||
* src/remote/remote_driver.c (remoteDomainGetVcpus): Avoid overflow
|
||||
on sending rpc.
|
||||
* daemon/remote.c (remoteDispatchDomainGetVcpus): Avoid overflow on
|
||||
receiving rpc.
|
||||
|
||||
(cherry picked from commit 774b21c163845170c9ffa873f5720d318812eaf6)
|
||||
|
||||
Conflicts:
|
||||
|
||||
daemon/remote.c
|
||||
src/remote/remote_driver.c
|
||||
|
||||
Change to internal.h required to avoid backporting 89d994ad.
|
||||
---
|
||||
daemon/remote.c | 3 ++-
|
||||
src/internal.h | 17 +++++++++++++++++
|
||||
src/libvirt.c | 5 +++--
|
||||
src/remote/remote_driver.c | 3 ++-
|
||||
4 files changed, 24 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/daemon/remote.c b/daemon/remote.c
|
||||
index 159430e..b707326 100644
|
||||
--- a/daemon/remote.c
|
||||
+++ b/daemon/remote.c
|
||||
@@ -1722,7 +1722,8 @@ remoteDispatchDomainGetVcpus (struct qemud_server *server ATTRIBUTE_UNUSED,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) {
|
||||
+ if (INT_MULTIPLY_OVERFLOW(args->maxinfo, args->maplen) ||
|
||||
+ args->maxinfo * args->maplen > REMOTE_CPUMAPS_MAX) {
|
||||
virDomainFree(dom);
|
||||
remoteDispatchFormatError (rerr, "%s", _("maxinfo * maplen > REMOTE_CPUMAPS_MAX"));
|
||||
return -1;
|
||||
diff --git a/src/internal.h b/src/internal.h
|
||||
index e263684..f47b842 100644
|
||||
--- a/src/internal.h
|
||||
+++ b/src/internal.h
|
||||
@@ -232,6 +232,23 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
+/* branch-specific: we don't want to update gnulib on the branch, so this
|
||||
+ * backports just one required macro from newer gnulib's intprops.h.
|
||||
+ * This version requires that both a and b are 'int', rather than
|
||||
+ * the fully type-generic version from gnulib. */
|
||||
+# define INT_MULTIPLY_OVERFLOW(a, b) \
|
||||
+ ((b) < 0 \
|
||||
+ ? ((a) < 0 \
|
||||
+ ? (a) < INT_MAX / (b) \
|
||||
+ : (b) == -1 \
|
||||
+ ? 0 \
|
||||
+ : INT_MIN / (b) < (a)) \
|
||||
+ : (b) == 0 \
|
||||
+ ? 0 \
|
||||
+ : ((a) < 0 \
|
||||
+ ? (a) < INT_MIN / (b) \
|
||||
+ : INT_MAX / (b) < (a)))
|
||||
+
|
||||
/* divide value by size, rounding up */
|
||||
# define VIR_DIV_UP(value, size) (((value) + (size) - 1) / (size))
|
||||
|
||||
diff --git a/src/libvirt.c b/src/libvirt.c
|
||||
index 8c70a1f..d8ab8f8 100644
|
||||
--- a/src/libvirt.c
|
||||
+++ b/src/libvirt.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include "util.h"
|
||||
#include "memory.h"
|
||||
#include "configmake.h"
|
||||
+#include "intprops.h"
|
||||
|
||||
#ifndef WITH_DRIVER_MODULES
|
||||
# ifdef WITH_TEST
|
||||
@@ -5363,8 +5364,8 @@ virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
|
||||
|
||||
/* Ensure that domainGetVcpus (aka remoteDomainGetVcpus) does not
|
||||
try to memcpy anything into a NULL pointer. */
|
||||
- if ((cpumaps == NULL && maplen != 0)
|
||||
- || (cpumaps && maplen <= 0)) {
|
||||
+ if (!cpumaps ? maplen != 0
|
||||
+ : (maplen <= 0 || INT_MULTIPLY_OVERFLOW(maxinfo, maplen))) {
|
||||
virLibDomainError(VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
goto error;
|
||||
}
|
||||
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
|
||||
index 4ca0d3b..c73452e 100644
|
||||
--- a/src/remote/remote_driver.c
|
||||
+++ b/src/remote/remote_driver.c
|
||||
@@ -2850,7 +2850,8 @@ remoteDomainGetVcpus (virDomainPtr domain,
|
||||
maxinfo, REMOTE_VCPUINFO_MAX);
|
||||
goto done;
|
||||
}
|
||||
- if (maxinfo * maplen > REMOTE_CPUMAPS_MAX) {
|
||||
+ if (INT_MULTIPLY_OVERFLOW(maxinfo, maplen) ||
|
||||
+ maxinfo * maplen > REMOTE_CPUMAPS_MAX) {
|
||||
remoteError(VIR_ERR_RPC,
|
||||
_("vCPU map buffer length exceeds maximum: %d > %d"),
|
||||
maxinfo * maplen, REMOTE_CPUMAPS_MAX);
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
From 775581ead9c0b6435e8a0dad2a6838909638e7b6 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Wed, 23 Mar 2011 10:30:49 -0600
|
||||
Subject: [PATCH 5/6] rpm: add missing dependencies
|
||||
|
||||
manually adapted from upstream 206fc979b1656722b254e683d89b3e9fc4480c63
|
||||
|
||||
Among others, the missing radvd dependency showed up as:
|
||||
|
||||
error: Failed to start network ipv6net
|
||||
error: Cannot find radvd - Possibly the package isn't installed: No such file
|
||||
or directory
|
||||
|
||||
even when radvd was installed, because the RADVD preprocessor
|
||||
symbol was missing at configure time.
|
||||
|
||||
* libvirt.spec.in (with_network): Add Build and BuildRequires for radvd
|
||||
(BuildRequires): Add libxslt and augeas for docs and test.
|
||||
(with_libvirtd): Add module-init-tools for modprobe.
|
||||
(with_nwfilter): Add BuildRequires for ebtables.
|
||||
---
|
||||
libvirt.spec.in | 26 ++++++++++++++++++++++++--
|
||||
1 files changed, 24 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libvirt.spec.in b/libvirt.spec.in
|
||||
index 23f4525..8ffb757 100644
|
||||
--- a/libvirt.spec.in
|
||||
+++ b/libvirt.spec.in
|
||||
@@ -219,15 +219,21 @@ Requires: %{name}-client = %{version}-%{release}
|
||||
# daemon is present
|
||||
%if %{with_libvirtd}
|
||||
Requires: bridge-utils
|
||||
+# for modprobe of pci devices
|
||||
+Requires: module-init-tools
|
||||
+# for /sbin/ip
|
||||
+Requires: iproute
|
||||
%endif
|
||||
%if %{with_network}
|
||||
Requires: dnsmasq >= 2.41
|
||||
+Requires: radvd
|
||||
+%endif
|
||||
+%if %{with_network} || %{with_nwfilter}
|
||||
Requires: iptables
|
||||
+Requires: iptables-ipv6
|
||||
%endif
|
||||
%if %{with_nwfilter}
|
||||
Requires: ebtables
|
||||
-Requires: iptables
|
||||
-Requires: iptables-ipv6
|
||||
%endif
|
||||
# needed for device enumeration
|
||||
%if %{with_hal}
|
||||
@@ -295,10 +301,15 @@ BuildRequires: xmlrpc-c-devel >= 1.14.0
|
||||
%endif
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: xhtml1-dtds
|
||||
+BuildRequires: libxslt
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gnutls-devel
|
||||
+%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
+# for augparse, optionally used in testing
|
||||
+BuildRequires: augeas
|
||||
+%endif
|
||||
%if %{with_hal}
|
||||
BuildRequires: hal-devel
|
||||
%endif
|
||||
@@ -323,8 +334,15 @@ BuildRequires: libselinux-devel
|
||||
%endif
|
||||
%if %{with_network}
|
||||
BuildRequires: dnsmasq >= 2.41
|
||||
+BuildRequires: iptables
|
||||
+BuildRequires: iptables-ipv6
|
||||
+BuildRequires: radvd
|
||||
+%endif
|
||||
+%if %{with_nwfilter}
|
||||
+BuildRequires: ebtables
|
||||
%endif
|
||||
BuildRequires: bridge-utils
|
||||
+BuildRequires: module-init-tools
|
||||
%if %{with_sasl}
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
%endif
|
||||
@@ -388,7 +406,11 @@ BuildRequires: libssh2-devel
|
||||
BuildRequires: netcf-devel >= 0.1.4
|
||||
%endif
|
||||
%if %{with_esx}
|
||||
+%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
|
||||
BuildRequires: libcurl-devel
|
||||
+%else
|
||||
+BuildRequires: curl-devel
|
||||
+%endif
|
||||
%endif
|
||||
%if %{with_audit}
|
||||
BuildRequires: audit-libs-devel
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
From c2d77ade37ee917ca258cb24ffb130fc07bb95b4 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Thu, 26 May 2011 08:18:46 -0600
|
||||
Subject: [PATCH 1/6] security: plug regression introduced in disk probe logic
|
||||
|
||||
This patch resolves:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=709775
|
||||
CVE-2011-2178 - regression introduced in disk probe logic
|
||||
|
||||
Regression introduced in commit d6623003 (v0.8.8) - using the
|
||||
wrong sizeof operand meant that security manager private data
|
||||
was overlaying the allowDiskFormatProbing member of struct
|
||||
_virSecurityManager. This reopens disk probing, which was
|
||||
supposed to be prevented by the solution to CVE-2010-2238.
|
||||
|
||||
* src/security/security_manager.c
|
||||
(virSecurityManagerGetPrivateData): Use correct offset.
|
||||
---
|
||||
src/security/security_manager.c | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/security/security_manager.c b/src/security/security_manager.c
|
||||
index 0246dd8..6f0becd 100644
|
||||
--- a/src/security/security_manager.c
|
||||
+++ b/src/security/security_manager.c
|
||||
@@ -107,7 +107,9 @@ virSecurityManagerPtr virSecurityManagerNew(const char *name,
|
||||
|
||||
void *virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr)
|
||||
{
|
||||
- return ((char*)mgr) + sizeof(mgr);
|
||||
+ /* This accesses the memory just beyond mgr, which was allocated
|
||||
+ * via VIR_ALLOC_VAR earlier. */
|
||||
+ return mgr + 1;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,27 +0,0 @@
|
||||
From 9679cde15cabf95c7538c3b6929893ec68552d23 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Kenigsberg <danken@redhat.com>
|
||||
Date: Sun, 20 Feb 2011 22:29:25 +0200
|
||||
Subject: [PATCH 3/6] virt-pki-validate: behave when CERTTOOL is missing
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=680270
|
||||
libvirt-client is missing some dependencies
|
||||
---
|
||||
tools/virt-pki-validate.in | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/tools/virt-pki-validate.in b/tools/virt-pki-validate.in
|
||||
index 207fa76..96659cf 100755
|
||||
--- a/tools/virt-pki-validate.in
|
||||
+++ b/tools/virt-pki-validate.in
|
||||
@@ -14,7 +14,7 @@ PORT=16514
|
||||
# First get certtool
|
||||
#
|
||||
CERTOOL=`which certtool 2>/dev/null`
|
||||
-if [ ! -x $CERTOOL ]
|
||||
+if [ ! -x "$CERTOOL" ]
|
||||
then
|
||||
echo "Could not locate the certtool program"
|
||||
echo "make sure the gnutls-utils (or gnutls-bin) package is installed"
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
+91
-349
@@ -31,19 +31,18 @@
|
||||
|
||||
# Then the hypervisor drivers that run on local host
|
||||
%define with_xen 0%{!?_without_xen:%{server_drivers}}
|
||||
%define with_xen_proxy 0%{!?_without_xen_proxy:%{server_drivers}}
|
||||
%define with_qemu 0%{!?_without_qemu:%{server_drivers}}
|
||||
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
|
||||
%define with_lxc 0%{!?_without_lxc:%{server_drivers}}
|
||||
%define with_vbox 0%{!?_without_vbox:%{server_drivers}}
|
||||
%define with_uml 0%{!?_without_uml:%{server_drivers}}
|
||||
%define with_xenapi 0%{!?_without_xenapi:%{server_drivers}}
|
||||
# XXX this shouldn't be here, but it mistakenly links into libvirtd
|
||||
%define with_one 0%{!?_without_one:%{server_drivers}}
|
||||
|
||||
# Then the hypervisor drivers that talk a native remote protocol
|
||||
%define with_phyp 0%{!?_without_phyp:1}
|
||||
%define with_esx 0%{!?_without_esx:1}
|
||||
%define with_vmware 0%{!?_without_vmware:1}
|
||||
|
||||
# Then the secondary host drivers
|
||||
%define with_network 0%{!?_without_network:%{server_drivers}}
|
||||
@@ -62,13 +61,6 @@
|
||||
%define with_udev 0%{!?_without_udev:0}
|
||||
%define with_hal 0%{!?_without_hal:0}
|
||||
%define with_yajl 0%{!?_without_yajl:0}
|
||||
%define with_nwfilter 0%{!?_without_nwfilter:0}
|
||||
%define with_libpcap 0%{!?_without_libpcap:0}
|
||||
%define with_macvtap 0%{!?_without_macvtap:0}
|
||||
%define with_libnl 0%{!?_without_libnl:0}
|
||||
%define with_audit 0%{!?_without_audit:0}
|
||||
%define with_dtrace 0%{!?_without_dtrace:0}
|
||||
%define with_cgconfig 0%{!?_without_cgconfig:0}
|
||||
|
||||
# Non-server/HV driver defaults which are always enabled
|
||||
%define with_python 0%{!?_without_python:1}
|
||||
@@ -82,21 +74,19 @@
|
||||
%define with_xen 0
|
||||
%endif
|
||||
|
||||
# Numactl is not available on s390[x] and ARM
|
||||
%ifarch s390 s390x %{arm}
|
||||
# Numactl is not available on s390[x]
|
||||
%ifarch s390 s390x
|
||||
%define with_numactl 0
|
||||
%endif
|
||||
|
||||
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor,
|
||||
# VMWare, or libxenserver (xenapi)
|
||||
# RHEL doesn't ship OpenVZ, VBox, UML, OpenNebula, PowerHypervisor or ESX
|
||||
%if 0%{?rhel}
|
||||
%define with_openvz 0
|
||||
%define with_vbox 0
|
||||
%define with_uml 0
|
||||
%define with_one 0
|
||||
%define with_phyp 0
|
||||
%define with_vmware 0
|
||||
%define with_xenapi 0
|
||||
%define with_esx 0
|
||||
%endif
|
||||
|
||||
# RHEL-5 has restricted QEMU to x86_64 only and is too old for LXC
|
||||
@@ -116,6 +106,11 @@
|
||||
%define with_xen 0
|
||||
%endif
|
||||
|
||||
# If Xen isn't turned on, we shouldn't build the xen proxy either
|
||||
%if ! %{with_xen}
|
||||
%define with_xen_proxy 0
|
||||
%endif
|
||||
|
||||
# Fedora doesn't have any QEMU on ppc64 - only ppc
|
||||
%if 0%{?fedora}
|
||||
%ifarch ppc64
|
||||
@@ -123,9 +118,11 @@
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer
|
||||
# PolicyKit was introduced in Fedora 8 / RHEL-6 or newer, allowing
|
||||
# the setuid Xen proxy to be killed off
|
||||
%if 0%{?fedora} >= 8 || 0%{?rhel} >= 6
|
||||
%define with_polkit 0%{!?_without_polkit:1}
|
||||
%define with_xen_proxy 0
|
||||
%endif
|
||||
|
||||
# libcapng is used to manage capabilities in Fedora 12 / RHEL-6 or newer
|
||||
@@ -150,32 +147,6 @@
|
||||
%define with_yajl 0%{!?_without_yajl:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
# Enable libpcap library
|
||||
%if %{with_qemu}
|
||||
%define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
|
||||
%define with_libpcap 0%{!?_without_libpcap:%{server_drivers}}
|
||||
%define with_macvtap 0%{!?_without_macvtap:%{server_drivers}}
|
||||
%endif
|
||||
|
||||
%if %{with_macvtap}
|
||||
%define with_libnl 1
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 11 || 0%{?rhel} >= 5
|
||||
%define with_audit 0%{!?_without_audit:1}
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
|
||||
%define with_dtrace 1
|
||||
%endif
|
||||
|
||||
# Pull in cgroups config system
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
%if %{with_qemu} || %{with_lxc}
|
||||
%define with_cgconfig 0%{!?_without_cgconfig:1}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Force QEMU to run as non-root
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
%define qemu_user qemu
|
||||
@@ -195,57 +166,60 @@
|
||||
%endif
|
||||
|
||||
|
||||
# there's no use compiling the network driver without
|
||||
# the libvirt daemon
|
||||
%if ! %{with_libvirtd}
|
||||
%define with_network 0
|
||||
%endif
|
||||
|
||||
Summary: Library providing a simple virtualization API
|
||||
Summary: Library providing a simple API virtualization
|
||||
Name: libvirt
|
||||
Version: 0.8.8
|
||||
Release: 7%{?dist}%{?extra_release}
|
||||
Version: 0.7.7
|
||||
Release: 5%{?dist}%{?extra_release}
|
||||
License: LGPLv2+
|
||||
Group: Development/Libraries
|
||||
Source: http://libvirt.org/sources/libvirt-%{version}.tar.gz
|
||||
Patch1: %{name}-%{version}-kernel-boot-index.patch
|
||||
Patch2: %{name}-%{version}-read-only-checks.patch
|
||||
# Patches 5, 6 CVE-2011-1486
|
||||
Patch3: %{name}-%{version}-threadsafe-libvirtd-error-reporting.patch
|
||||
Patch4: %{name}-%{version}-avoid-resetting-errors.patch
|
||||
Patch5: %{name}-%{version}-security-plug-regression-introduced-in-disk-probe-lo.patch
|
||||
Patch6: %{name}-%{version}-Requires-gettext-for-client-package.patch
|
||||
Patch7: %{name}-%{version}-virt-pki-validate-behave-when-CERTTOOL-is-missing.patch
|
||||
Patch8: %{name}-%{version}-build-add-dependency-on-gnutls-utils.patch
|
||||
Patch9: %{name}-%{version}-rpm-add-missing-dependencies.patch
|
||||
Patch10: %{name}-%{version}-remote-protect-against-integer-overflow.patch
|
||||
Patch11: %{name}-%{version}-make-commandtest-more-robust.patch
|
||||
# Fix USB devices by product with security enabled (bz 574136)
|
||||
Patch1: %{name}-%{version}-fix-usb-product.patch
|
||||
# Set kernel/initrd in security driver, fixes some URL installs (bz 566425)
|
||||
Patch2: %{name}-%{version}-set-kernel-perms.patch
|
||||
# Fix slow storage volume allocation (bz 582356)
|
||||
Patch3: %{name}-%{version}-fix-slow-dsync.patch
|
||||
# Fix nodedev XML conversion errors (bz 591262)
|
||||
Patch4: %{name}-%{version}-nodedev-conversions.patch
|
||||
# Fix PCI xml decimal parsing (bz 582752)
|
||||
Patch5: %{name}-%{version}-pci-decimal-parsing.patch
|
||||
# Fix CDROM media connect/eject (bz 582005)
|
||||
Patch6: %{name}-%{version}-fix-cdrom-change.patch
|
||||
# Always report qemu startup output on error (bz 581381)
|
||||
Patch7: %{name}-%{version}-qemu-startup-output.patch
|
||||
# Fix crash from 'virsh dominfo' if secdriver disabled (bz 581166)
|
||||
Patch8: %{name}-%{version}-no-secdriver-crash.patch
|
||||
# Add qemu.conf options for audio workaround
|
||||
Patch9: %{name}-%{version}-audio-config.patch
|
||||
# Fix parsing certain USB sysfs files (bz 598272)
|
||||
Patch10: %{name}-%{version}-fix-usb-parsing.patch
|
||||
# Sanitize pool target paths (bz 494005)
|
||||
Patch11: %{name}-%{version}-sanitize-pool.patch
|
||||
# Add qemu.conf for clear emulator capabilities
|
||||
Patch12: %{name}-%{version}-caps-option.patch
|
||||
# Prevent libvirtd inside a VM from breaking network access (bz 235961)
|
||||
Patch13: %{name}-%{version}-network-collision.patch
|
||||
# Mention --all in 'virsh list' docs (bz 575512)
|
||||
Patch14: %{name}-%{version}-man-page-list.patch
|
||||
# Initscript fixes (bz 565238)
|
||||
Patch15: %{name}-%{version}-init-fixes.patch
|
||||
# List wireless interfaces via nodedev-list (bz 596928)
|
||||
Patch16: %{name}-%{version}-udev-wireless.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||
URL: http://libvirt.org/
|
||||
BuildRequires: python-devel
|
||||
|
||||
# The client side, i.e. shared libs and virsh are in a subpackage
|
||||
Requires: %{name}-client = %{version}-%{release}
|
||||
Requires: libvirt-client = %{version}-%{release}
|
||||
|
||||
# Used by many of the drivers, so turn it on whenever the
|
||||
# daemon is present
|
||||
%if %{with_libvirtd}
|
||||
Requires: bridge-utils
|
||||
# for modprobe of pci devices
|
||||
Requires: module-init-tools
|
||||
# for /sbin/ip
|
||||
Requires: iproute
|
||||
%endif
|
||||
%if %{with_network}
|
||||
Requires: dnsmasq >= 2.41
|
||||
Requires: radvd
|
||||
%endif
|
||||
%if %{with_network} || %{with_nwfilter}
|
||||
Requires: dnsmasq
|
||||
Requires: iptables
|
||||
Requires: iptables-ipv6
|
||||
%endif
|
||||
%if %{with_nwfilter}
|
||||
Requires: ebtables
|
||||
%endif
|
||||
# needed for device enumeration
|
||||
%if %{with_hal}
|
||||
@@ -302,26 +276,18 @@ Requires: parted
|
||||
# For multipath support
|
||||
Requires: device-mapper
|
||||
%endif
|
||||
%if %{with_cgconfig}
|
||||
Requires: libcgroup
|
||||
%endif
|
||||
%if %{with_xen}
|
||||
BuildRequires: xen-devel
|
||||
%endif
|
||||
%if %{with_one}
|
||||
BuildRequires: xmlrpc-c-devel >= 1.14.0
|
||||
BuildRequires: xmlrpc-c-devel >= 1.14.0 xmlrpc-c-client
|
||||
%endif
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: xhtml1-dtds
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gnutls-devel
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
# for augparse, optionally used in testing
|
||||
BuildRequires: augeas
|
||||
%endif
|
||||
%if %{with_hal}
|
||||
BuildRequires: hal-devel
|
||||
%endif
|
||||
@@ -332,12 +298,6 @@ BuildRequires: libpciaccess-devel >= 0.10.9
|
||||
%if %{with_yajl}
|
||||
BuildRequires: yajl-devel
|
||||
%endif
|
||||
%if %{with_libpcap}
|
||||
BuildRequires: libpcap-devel
|
||||
%endif
|
||||
%if %{with_libnl}
|
||||
BuildRequires: libnl-devel
|
||||
%endif
|
||||
%if %{with_avahi}
|
||||
BuildRequires: avahi-devel
|
||||
%endif
|
||||
@@ -345,16 +305,9 @@ BuildRequires: avahi-devel
|
||||
BuildRequires: libselinux-devel
|
||||
%endif
|
||||
%if %{with_network}
|
||||
BuildRequires: dnsmasq >= 2.41
|
||||
BuildRequires: iptables
|
||||
BuildRequires: iptables-ipv6
|
||||
BuildRequires: radvd
|
||||
%endif
|
||||
%if %{with_nwfilter}
|
||||
BuildRequires: ebtables
|
||||
BuildRequires: dnsmasq
|
||||
%endif
|
||||
BuildRequires: bridge-utils
|
||||
BuildRequires: module-init-tools
|
||||
%if %{with_sasl}
|
||||
BuildRequires: cyrus-sasl-devel
|
||||
%endif
|
||||
@@ -417,21 +370,6 @@ BuildRequires: libssh2-devel
|
||||
%if %{with_netcf}
|
||||
BuildRequires: netcf-devel >= 0.1.4
|
||||
%endif
|
||||
%if %{with_esx}
|
||||
%if 0%{?fedora} >= 9 || 0%{?rhel} >= 6
|
||||
BuildRequires: libcurl-devel
|
||||
%else
|
||||
BuildRequires: curl-devel
|
||||
%endif
|
||||
%endif
|
||||
%if %{with_audit}
|
||||
BuildRequires: audit-libs-devel
|
||||
%endif
|
||||
%if %{with_dtrace}
|
||||
# we need /usr/sbin/dtrace
|
||||
BuildRequires: systemtap-sdt-devel
|
||||
%endif
|
||||
|
||||
|
||||
# Fedora build root suckage
|
||||
BuildRequires: gawk
|
||||
@@ -449,10 +387,6 @@ Requires: ncurses
|
||||
# So remote clients can access libvirt over SSH tunnel
|
||||
# (client invokes 'nc' against the UNIX socket on the server)
|
||||
Requires: nc
|
||||
# Needed by libvirt-guests init script.
|
||||
Requires: gettext
|
||||
# Needed by virt-pki-validate script.
|
||||
Requires: gnutls-utils
|
||||
%if %{with_sasl}
|
||||
Requires: cyrus-sasl
|
||||
# Not technically required, but makes 'out-of-box' config
|
||||
@@ -467,7 +401,7 @@ virtualization capabilities of recent versions of Linux (and other OSes).
|
||||
%package devel
|
||||
Summary: Libraries, includes, etc. to compile with the libvirt library
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-client = %{version}-%{release}
|
||||
Requires: libvirt-client = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
%if %{with_xen}
|
||||
Requires: xen-devel
|
||||
@@ -481,7 +415,7 @@ the virtualization capabilities of recent versions of Linux (and other OSes).
|
||||
%package python
|
||||
Summary: Python bindings for the libvirt library
|
||||
Group: Development/Libraries
|
||||
Requires: %{name}-client = %{version}-%{release}
|
||||
Requires: libvirt-client = %{version}-%{release}
|
||||
|
||||
%description python
|
||||
The libvirt-python package contains a module that permits applications
|
||||
@@ -503,6 +437,11 @@ of recent versions of Linux (and other OSes).
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
|
||||
%build
|
||||
%if ! %{with_xen}
|
||||
@@ -525,10 +464,6 @@ of recent versions of Linux (and other OSes).
|
||||
%define _without_vbox --without-vbox
|
||||
%endif
|
||||
|
||||
%if ! %{with_xenapi}
|
||||
%define _without_xenapi --without-xenapi
|
||||
%endif
|
||||
|
||||
%if ! %{with_sasl}
|
||||
%define _without_sasl --without-sasl
|
||||
%endif
|
||||
@@ -545,10 +480,6 @@ of recent versions of Linux (and other OSes).
|
||||
%define _without_esx --without-esx
|
||||
%endif
|
||||
|
||||
%if ! %{with_vmware}
|
||||
%define _without_vmware --without-vmware
|
||||
%endif
|
||||
|
||||
%if ! %{with_polkit}
|
||||
%define _without_polkit --without-polkit
|
||||
%endif
|
||||
@@ -625,35 +556,11 @@ of recent versions of Linux (and other OSes).
|
||||
%define _without_yajl --without-yajl
|
||||
%endif
|
||||
|
||||
%if ! %{with_libpcap}
|
||||
%define _without_libpcap --without-libpcap
|
||||
%endif
|
||||
|
||||
%if ! %{with_macvtap}
|
||||
%define _without_macvtap --without-macvtap
|
||||
%endif
|
||||
|
||||
%if ! %{with_audit}
|
||||
%define _without_audit --without-audit
|
||||
%endif
|
||||
|
||||
%if ! %{with_dtrace}
|
||||
%define _without_dtrace --without-dtrace
|
||||
%endif
|
||||
|
||||
%define when %(date +"%%F-%%T")
|
||||
%define where %(hostname)
|
||||
%define who %{?packager}%{!?packager:Unknown}
|
||||
%define with_packager --with-packager="%{who}, %{when}, %{where}"
|
||||
%define with_packager_version --with-packager-version="%{release}"
|
||||
|
||||
|
||||
%configure %{?_without_xen} \
|
||||
%{?_without_qemu} \
|
||||
%{?_without_openvz} \
|
||||
%{?_without_lxc} \
|
||||
%{?_without_vbox} \
|
||||
%{?_without_xenapi} \
|
||||
%{?_without_sasl} \
|
||||
%{?_without_avahi} \
|
||||
%{?_without_polkit} \
|
||||
@@ -663,7 +570,6 @@ of recent versions of Linux (and other OSes).
|
||||
%{?_without_one} \
|
||||
%{?_without_phyp} \
|
||||
%{?_without_esx} \
|
||||
%{?_without_vmware} \
|
||||
%{?_without_network} \
|
||||
%{?_with_rhel5_api} \
|
||||
%{?_without_storage_fs} \
|
||||
@@ -678,12 +584,6 @@ of recent versions of Linux (and other OSes).
|
||||
%{?_without_hal} \
|
||||
%{?_without_udev} \
|
||||
%{?_without_yajl} \
|
||||
%{?_without_libpcap} \
|
||||
%{?_without_macvtap} \
|
||||
%{?_without_audit} \
|
||||
%{?_without_dtrace} \
|
||||
%{with_packager} \
|
||||
%{with_packager_version} \
|
||||
--with-qemu-user=%{qemu_user} \
|
||||
--with-qemu-group=%{qemu_group} \
|
||||
--with-init-script=redhat \
|
||||
@@ -695,7 +595,7 @@ gzip -9 ChangeLog
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%makeinstall
|
||||
for i in domain-events/events-c dominfo domsuspend hellolibvirt openauth python xml/nwfilter systemtap
|
||||
for i in domain-events/events-c dominfo domsuspend hellolibvirt python
|
||||
do
|
||||
(cd examples/$i ; make clean ; rm -rf .deps .libs Makefile Makefile.in)
|
||||
done
|
||||
@@ -705,7 +605,6 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
||||
|
||||
%if %{with_network}
|
||||
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/lib/libvirt/dnsmasq/
|
||||
# We don't want to install /etc/libvirt/qemu/networks in the main %files list
|
||||
# because if the admin wants to delete the default network completely, we don't
|
||||
# want to end up re-incarnating it on every RPM upgrade.
|
||||
@@ -739,38 +638,20 @@ rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}
|
||||
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}
|
||||
%endif
|
||||
|
||||
%if ! %{with_libvirtd}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/nwfilter
|
||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-%{version}/html \
|
||||
$RPM_BUILD_ROOT%{_datadir}/doc/libvirt-devel-%{version}/
|
||||
%endif
|
||||
|
||||
%if ! %{with_qemu}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/qemu.conf
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%endif
|
||||
%if ! %{with_lxc}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/libvirt/lxc.conf
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.lxc
|
||||
%endif
|
||||
%if ! %{with_uml}
|
||||
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||
|
||||
%if %{with_libvirtd}
|
||||
chmod 0644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%check
|
||||
cd tests
|
||||
# These 3 tests don't current work in a mock build root
|
||||
for i in nodeinfotest daemon-conf seclabeltest
|
||||
do
|
||||
rm -f $i
|
||||
printf "#!/bin/sh\nexit 0\n" > $i
|
||||
chmod +x $i
|
||||
done
|
||||
make check
|
||||
|
||||
%pre
|
||||
%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
|
||||
# Normally 'setup' adds this in /etc/passwd, but this is
|
||||
@@ -791,7 +672,7 @@ getent passwd qemu >/dev/null || \
|
||||
# or on the first upgrade from a non-network aware libvirt only.
|
||||
# We check this by looking to see if the daemon is already installed
|
||||
/sbin/chkconfig --list libvirtd 1>/dev/null 2>&1
|
||||
if test $? != 0 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||
if [ $? != 0 -a ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ]
|
||||
then
|
||||
UUID=`/usr/bin/uuidgen`
|
||||
sed -e "s,</name>,</name>\n <uuid>$UUID</uuid>," \
|
||||
@@ -801,12 +682,6 @@ then
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if %{with_cgconfig}
|
||||
if [ "$1" -eq "1" ]; then
|
||||
/sbin/chkconfig cgconfig on
|
||||
fi
|
||||
%endif
|
||||
|
||||
/sbin/chkconfig --add libvirtd
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service libvirtd condrestart > /dev/null 2>&1
|
||||
@@ -821,25 +696,7 @@ if [ $1 = 0 ]; then
|
||||
fi
|
||||
%endif
|
||||
|
||||
%preun client
|
||||
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/chkconfig --del libvirt-guests
|
||||
rm -f /var/lib/libvirt/libvirt-guests
|
||||
fi
|
||||
|
||||
%post client
|
||||
|
||||
/sbin/ldconfig
|
||||
/sbin/chkconfig --add libvirt-guests
|
||||
if [ $1 -ge 1 ]; then
|
||||
level=$(/sbin/runlevel | /bin/cut -d ' ' -f 2)
|
||||
if /sbin/chkconfig --list libvirt-guests | /bin/grep -q $level:on ; then
|
||||
# this doesn't do anything but allowing for libvirt-guests to be
|
||||
# stopped on the first shutdown
|
||||
/sbin/service libvirt-guests start > /dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
%post client -p /sbin/ldconfig
|
||||
|
||||
%postun client -p /sbin/ldconfig
|
||||
|
||||
@@ -856,29 +713,19 @@ fi
|
||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/qemu/networks/autostart
|
||||
%endif
|
||||
|
||||
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/nwfilter/
|
||||
%{_sysconfdir}/libvirt/nwfilter/*.xml
|
||||
|
||||
%{_sysconfdir}/rc.d/init.d/libvirtd
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirtd
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||
%if %{with_dtrace}
|
||||
%{_datadir}/systemtap/tapsets/libvirtd.stp
|
||||
%endif
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/uml/
|
||||
|
||||
%if %{with_qemu}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/qemu.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||
%endif
|
||||
%if %{with_lxc}
|
||||
%config(noreplace) %{_sysconfdir}/libvirt/lxc.conf
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.lxc
|
||||
%endif
|
||||
%if %{with_uml}
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.uml
|
||||
%endif
|
||||
|
||||
%dir %{_datadir}/libvirt/
|
||||
@@ -890,14 +737,15 @@ fi
|
||||
|
||||
%dir %{_localstatedir}/run/libvirt/
|
||||
|
||||
%dir %{_localstatedir}/lib/libvirt/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
|
||||
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/boot/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/cache/libvirt/
|
||||
|
||||
%if %{with_qemu}
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/run/libvirt/qemu/
|
||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
|
||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
|
||||
%dir %attr(0700, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
|
||||
%dir %attr(0700, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
|
||||
%endif
|
||||
%if %{with_lxc}
|
||||
%dir %{_localstatedir}/run/libvirt/lxc/
|
||||
@@ -910,7 +758,6 @@ fi
|
||||
%if %{with_network}
|
||||
%dir %{_localstatedir}/run/libvirt/network/
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/lib/libvirt/network/
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
|
||||
%endif
|
||||
|
||||
%if %{with_qemu}
|
||||
@@ -936,6 +783,10 @@ fi
|
||||
|
||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/
|
||||
|
||||
%if %{with_xen_proxy}
|
||||
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
|
||||
%endif
|
||||
|
||||
%if %{with_lxc}
|
||||
%attr(0755, root, root) %{_libexecdir}/libvirt_lxc
|
||||
%endif
|
||||
@@ -943,8 +794,6 @@ fi
|
||||
%attr(0755, root, root) %{_libexecdir}/libvirt_parthelper
|
||||
%attr(0755, root, root) %{_sbindir}/libvirtd
|
||||
|
||||
%{_mandir}/man8/libvirtd.8*
|
||||
|
||||
%doc docs/*.xml
|
||||
%endif
|
||||
|
||||
@@ -964,7 +813,6 @@ fi
|
||||
%dir %{_datadir}/libvirt/schemas/
|
||||
|
||||
%{_datadir}/libvirt/schemas/domain.rng
|
||||
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
||||
%{_datadir}/libvirt/schemas/network.rng
|
||||
%{_datadir}/libvirt/schemas/storagepool.rng
|
||||
%{_datadir}/libvirt/schemas/storagevol.rng
|
||||
@@ -973,14 +821,9 @@ fi
|
||||
%{_datadir}/libvirt/schemas/interface.rng
|
||||
%{_datadir}/libvirt/schemas/secret.rng
|
||||
%{_datadir}/libvirt/schemas/storageencryption.rng
|
||||
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||
|
||||
%{_datadir}/libvirt/cpu_map.xml
|
||||
|
||||
%{_sysconfdir}/rc.d/init.d/libvirt-guests
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/libvirt-guests
|
||||
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/
|
||||
|
||||
%if %{with_sasl}
|
||||
%config(noreplace) %{_sysconfdir}/sasl2/libvirt.conf
|
||||
%endif
|
||||
@@ -1004,9 +847,7 @@ fi
|
||||
%doc examples/domain-events/events-c
|
||||
%doc examples/dominfo
|
||||
%doc examples/domsuspend
|
||||
%doc examples/openauth
|
||||
%doc examples/xml
|
||||
%doc examples/systemtap
|
||||
|
||||
%if %{with_python}
|
||||
%files python
|
||||
@@ -1022,126 +863,27 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jul 5 2011 Laine Stump <laine@redhat.com> - 0.8.8-7
|
||||
- Make commandtest more robust.
|
||||
* Thu Jun 17 2010 Cole Robinson <crobinso@redhat.com> - 0.7.7-5.fc13
|
||||
- Add qemu.conf options for audio workaround
|
||||
- Fix parsing certain USB sysfs files (bz 598272)
|
||||
- Sanitize pool target paths (bz 494005)
|
||||
- Add qemu.conf for clear emulator capabilities
|
||||
- Prevent libvirtd inside a VM from breaking network access (bz 235961)
|
||||
- Mention --all in 'virsh list' docs (bz 575512)
|
||||
- Initscript fixes (bz 565238)
|
||||
- List wireless interfaces via nodedev-list (bz 596928)
|
||||
|
||||
* Wed Jul 5 2011 Peter Robinson <pbrobinson@gmail.com> - 0.8.8-6
|
||||
- Add ARM to NUMA excludes
|
||||
* Tue May 18 2010 Cole Robinson <crobinso@redhat.com> - 0.7.7-4.fc13
|
||||
- Fix nodedev XML conversion errors (bz 591262)
|
||||
- Fix PCI xml decimal parsing (bz 582752)
|
||||
- Fix CDROM media connect/eject (bz 582005)
|
||||
- Always report qemu startup output on error (bz 581381)
|
||||
- Fix crash from 'virsh dominfo' if secdriver disabled (bz 581166)
|
||||
|
||||
* Tue Jul 5 2011 Laine Stump <laine@redhat.com> 0.8.8-5
|
||||
- Fix for CVE-2011-2178, regression introduced in disk probe logic,
|
||||
Bug 709775
|
||||
- Fix for CVE-2011-2511, integer overflow in VirDomainGetVcpus,
|
||||
Bug 717204
|
||||
- Add several build and runtime dependencies to specfile
|
||||
Bug 680270
|
||||
* Tue Apr 20 2010 Cole Robinson <crobinso@redhat.com> - 0.7.7-3.fc13
|
||||
- Fix slow storage volume allocation (bz 582356)
|
||||
|
||||
* Tue Apr 5 2011 Laine Stump <laine@redhat.com> 0.8.8-4
|
||||
- Fix for CVE-2011-1486, error reporting in libvirtd is not thread safe,
|
||||
bug 693457
|
||||
|
||||
* Tue Mar 15 2011 Daniel Veillard <veillard@redhat.com> - 0.8.8-3
|
||||
- fix a lack of API check on read-only connections 683655
|
||||
- CVE-2011-1146
|
||||
|
||||
* Mon Feb 21 2011 Daniel P. Berrange <berrange@redhat.com> - 0.8.8-2
|
||||
- Fix kernel boot with latest QEMU
|
||||
|
||||
* Thu Feb 17 2011 Daniel Veillard <veillard@redhat.com> - 0.8.8-1
|
||||
- expose new API for sysinfo extraction
|
||||
- cgroup blkio weight support
|
||||
- smartcard device support
|
||||
- qemu: Support per-device boot ordering
|
||||
- Various improvements and bug fixes
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.7-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Thu Jan 6 2011 Daniel Veillard <veillard@redhat.com> - 0.8.7-1
|
||||
- Preliminary support for VirtualBox 4.0
|
||||
- IPv6 support
|
||||
- Add VMware Workstation and Player driver driver
|
||||
- Add network disk support
|
||||
- Various improvements and bug fixes
|
||||
- from 0.8.6:
|
||||
- Add support for iSCSI target auto-discovery
|
||||
- QED: Basic support for QED images
|
||||
- remote console support
|
||||
- support for SPICE graphics
|
||||
- sysinfo and VMBIOS support
|
||||
- virsh qemu-monitor-command
|
||||
- various improvements and bug fixes
|
||||
|
||||
* Fri Oct 29 2010 Daniel Veillard <veillard@redhat.com> - 0.8.5-1
|
||||
- Enable JSON and netdev features in QEMU >= 0.13
|
||||
- framework for auditing integration
|
||||
- framework DTrace/SystemTap integration
|
||||
- Setting the number of vcpu at boot
|
||||
- Enable support for nested SVM
|
||||
- Virtio plan9fs filesystem QEMU
|
||||
- Memory parameter controls
|
||||
- various improvements and bug fixes
|
||||
|
||||
* Wed Sep 29 2010 jkeating - 0.8.4-3
|
||||
- Rebuilt for gcc bug 634757
|
||||
|
||||
* Thu Sep 16 2010 Dan Horák <dan[at]danny.cz> - 0.8.4-2
|
||||
- disable the nwfilterxml2xmltest also on s390(x)
|
||||
|
||||
* Mon Sep 13 2010 Daniel Veillard <veillard@redhat.com> - 0.8.4-1
|
||||
- Upstream release 0.8.4
|
||||
|
||||
* Mon Aug 23 2010 Daniel P. Berrange <berrange@redhat.com> - 0.8.3-2
|
||||
- Fix potential overflow in boot menu code
|
||||
|
||||
* Mon Aug 23 2010 Daniel P. Berrange <berrange@redhat.com> - 0.8.3-1
|
||||
- Upstream release 0.8.3
|
||||
|
||||
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.8.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
||||
|
||||
* Mon Jul 12 2010 Daniel P. Berrange <berrange@redhat.com> - 0.8.2-2
|
||||
- CVE-2010-2237 ignoring defined main disk format when looking up disk backing stores
|
||||
- CVE-2010-2238 ignoring defined disk backing store format when recursing into disk
|
||||
image backing stores
|
||||
- CVE-2010-2239 not setting user defined backing store format when creating new image
|
||||
- CVE-2010-2242 libvirt: improperly mapped source privileged ports may allow for
|
||||
obtaining privileged resources on the host
|
||||
|
||||
* Mon Jul 5 2010 Daniel Veillard <veillard@redhat.com> - 0.8.2-1
|
||||
- Upstream release 0.8.2
|
||||
- phyp: adding support for IVM
|
||||
- libvirt: introduce domainCreateWithFlags API
|
||||
- add 802.1Qbh and 802.1Qbg switches handling
|
||||
- Support for VirtualBox version 3.2
|
||||
- Init script for handling guests on shutdown/boot
|
||||
- qemu: live migration with non-shared storage for kvm
|
||||
|
||||
* Fri Apr 30 2010 Daniel Veillard <veillard@redhat.com> - 0.8.1-1
|
||||
- Upstream release 0.8.1
|
||||
- Starts dnsmasq from libvirtd with --dhcp-hostsfile
|
||||
- Add virDomainGetBlockInfo API to query disk sizing
|
||||
- a lot of bug fixes and cleanups
|
||||
|
||||
* Mon Apr 12 2010 Daniel Veillard <veillard@redhat.com> - 0.8.0-1
|
||||
- Upstream release 0.8.0
|
||||
- Snapshotting support (QEmu/VBox/ESX)
|
||||
- Network filtering API
|
||||
- XenAPI driver
|
||||
- new APIs for domain events
|
||||
- Libvirt managed save API
|
||||
- timer subselection for domain clock
|
||||
- synchronous hooks
|
||||
- API to update guest CPU to host CPU
|
||||
- virDomainUpdateDeviceFlags new API
|
||||
- migrate max downtime API
|
||||
- volume wiping API
|
||||
- and many bug fixes
|
||||
|
||||
* Tue Mar 30 2010 Richard W.M. Jones <rjones@redhat.com> - 0.7.7-3.fc14
|
||||
- No change, just rebuild against new libparted with bumped soname.
|
||||
|
||||
* Mon Mar 22 2010 Cole Robinson <crobinso@redhat.com> - 0.7.7-2.fc14
|
||||
* Mon Mar 22 2010 Cole Robinson <crobinso@redhat.com> - 0.7.7-2.fc13
|
||||
- Fix USB devices by product with security enabled (bz 574136)
|
||||
- Set kernel/initrd in security driver, fixes some URL installs (bz 566425)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user