Compare commits
67 Commits
libvirt-0_
...
F-12-split
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
288291b795 | ||
|
|
7c2073faca | ||
|
|
5b528ba717 | ||
|
|
4f731a7250 | ||
|
|
f1ac0031f5 | ||
|
|
e45b9c9030 | ||
|
|
3cf75c269d | ||
|
|
585033f372 | ||
|
|
897506e66a | ||
|
|
e4bf8ffa42 | ||
|
|
20367a58a6 | ||
|
|
aa037364ed | ||
|
|
c034c1a3b2 | ||
|
|
da05e02884 | ||
|
|
e1b7b518ac | ||
|
|
581b5f5022 | ||
|
|
c476c8b683 | ||
|
|
b93eafc59f | ||
|
|
2105d62ca8 | ||
|
|
743adffffe | ||
|
|
11e3b51c0d | ||
|
|
66df925739 | ||
|
|
b20a5c6d3b | ||
|
|
7f58f3aa54 | ||
|
|
6577b14441 | ||
|
|
2e7812764f | ||
|
|
854b878580 | ||
|
|
89c28e4013 | ||
|
|
db269c2d21 | ||
|
|
98e4f7ee9f | ||
|
|
0c4afc5ee9 | ||
|
|
593255292e | ||
|
|
ccafc8ecb4 | ||
|
|
a38fb9cbc1 | ||
|
|
6359121866 | ||
|
|
b20d669e88 | ||
|
|
a3e1cc37ed | ||
|
|
a6eca3382d | ||
|
|
c6c5072e90 | ||
|
|
705fd20a0e | ||
|
|
e0e9927d93 | ||
|
|
bae7a0fb84 | ||
|
|
36aee593bc | ||
|
|
dc0cb0e91a | ||
|
|
84d66312fe | ||
|
|
4f644ce267 | ||
|
|
cdd5b3d62d | ||
|
|
53f63aa62d | ||
|
|
748df35c5f | ||
|
|
a6e23d00fa | ||
|
|
c6d11b43c9 | ||
|
|
83091ff0dd | ||
|
|
4465a63872 | ||
|
|
3f397d9786 | ||
|
|
750aec5507 | ||
|
|
d7c1d3bbc0 | ||
|
|
fa0f21c263 | ||
|
|
afdaf5d354 | ||
|
|
26bba5aea9 | ||
|
|
1a4185bdcc | ||
|
|
6a73119e65 | ||
|
|
1e2f9fce0a | ||
|
|
f5edf79c95 | ||
|
|
b59e64bf44 | ||
|
|
a09fc2658a | ||
|
|
a008fcf27e | ||
|
|
511f6cd625 |
@@ -5,3 +5,9 @@ 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
diff -rup libvirt-0.6.1.orig/src/storage_driver.c libvirt-0.6.1.new/src/storage_driver.c
|
||||
--- libvirt-0.6.1.orig/src/storage_driver.c 2009-02-16 03:43:41.000000000 -0500
|
||||
+++ libvirt-0.6.1.new/src/storage_driver.c 2009-03-06 08:02:51.000000000 -0500
|
||||
@@ -1296,7 +1296,6 @@ storageVolumeDelete(virStorageVolPtr obj
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
- virStorageVolDefFree(vol);
|
||||
if (pool)
|
||||
virStoragePoolObjUnlock(pool);
|
||||
return ret;
|
||||
@@ -1,277 +0,0 @@
|
||||
diff -r 961d4b1ca1d3 qemud/libvirtd_qemu.aug
|
||||
--- a/qemud/libvirtd_qemu.aug Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/qemud/libvirtd_qemu.aug Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -27,6 +27,8 @@ module Libvirtd_qemu =
|
||||
| str_entry "vnc_tls_x509_cert_dir"
|
||||
| bool_entry "vnc_tls_x509_verify"
|
||||
| str_entry "vnc_password"
|
||||
+ | bool_entry "vnc_sasl"
|
||||
+ | str_entry "vnc_sasl_dir"
|
||||
|
||||
(* Each enty in the config is one of the following three ... *)
|
||||
let entry = vnc_entry
|
||||
diff -r 961d4b1ca1d3 qemud/test_libvirtd_qemu.aug
|
||||
--- a/qemud/test_libvirtd_qemu.aug Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/qemud/test_libvirtd_qemu.aug Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -60,6 +60,25 @@ vnc_tls_x509_verify = 1
|
||||
# example here before you set this
|
||||
#
|
||||
vnc_password = \"XYZ12345\"
|
||||
+
|
||||
+
|
||||
+# Enable use of SASL encryption on the VNC server. This requires
|
||||
+# a VNC client which supports the SASL protocol extension.
|
||||
+# Examples include vinagre, virt-viewer and virt-manager
|
||||
+# itself. UltraVNC, RealVNC, TightVNC do not support this
|
||||
+#
|
||||
+# It is necessary to configure /etc/sasl2/qemu.conf to choose
|
||||
+# the desired SASL plugin (eg, GSSPI for Kerberos)
|
||||
+#
|
||||
+vnc_sasl = 1
|
||||
+
|
||||
+
|
||||
+# The default SASL configuration file is located in /etc/sasl2/
|
||||
+# When running libvirtd unprivileged, it may be desirable to
|
||||
+# override the configs in this location. Set this parameter to
|
||||
+# point to the directory, and create a qemu.conf in that location
|
||||
+#
|
||||
+vnc_sasl_dir = \"/some/directory/sasl2\"
|
||||
"
|
||||
|
||||
test Libvirtd_qemu.lns get conf =
|
||||
@@ -123,3 +142,22 @@ vnc_password = \"XYZ12345\"
|
||||
{ "#comment" = "example here before you set this" }
|
||||
{ "#comment" = "" }
|
||||
{ "vnc_password" = "XYZ12345" }
|
||||
+{ "#empty" }
|
||||
+{ "#empty" }
|
||||
+{ "#comment" = "Enable use of SASL encryption on the VNC server. This requires" }
|
||||
+{ "#comment" = "a VNC client which supports the SASL protocol extension." }
|
||||
+{ "#comment" = "Examples include vinagre, virt-viewer and virt-manager" }
|
||||
+{ "#comment" = "itself. UltraVNC, RealVNC, TightVNC do not support this" }
|
||||
+{ "#comment" = "" }
|
||||
+{ "#comment" = "It is necessary to configure /etc/sasl2/qemu.conf to choose" }
|
||||
+{ "#comment" = "the desired SASL plugin (eg, GSSPI for Kerberos)" }
|
||||
+{ "#comment" = "" }
|
||||
+{ "vnc_sasl" = "1" }
|
||||
+{ "#empty" }
|
||||
+{ "#empty" }
|
||||
+{ "#comment" = "The default SASL configuration file is located in /etc/sasl2/" }
|
||||
+{ "#comment" = "When running libvirtd unprivileged, it may be desirable to" }
|
||||
+{ "#comment" = "override the configs in this location. Set this parameter to" }
|
||||
+{ "#comment" = "point to the directory, and create a qemu.conf in that location" }
|
||||
+{ "#comment" = "" }
|
||||
+{ "vnc_sasl_dir" = "/some/directory/sasl2" }
|
||||
diff -r 961d4b1ca1d3 src/qemu.conf
|
||||
--- a/src/qemu.conf Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/src/qemu.conf Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -60,6 +60,27 @@
|
||||
# vnc_password = "XYZ12345"
|
||||
|
||||
|
||||
+# Enable use of SASL encryption on the VNC server. This requires
|
||||
+# a VNC client which supports the SASL protocol extension.
|
||||
+# Examples include vinagre, virt-viewer and virt-manager
|
||||
+# itself. UltraVNC, RealVNC, TightVNC do not support this
|
||||
+#
|
||||
+# It is necessary to configure /etc/sasl2/qemu.conf to choose
|
||||
+# the desired SASL plugin (eg, GSSPI for Kerberos)
|
||||
+#
|
||||
+# vnc_sasl = 1
|
||||
+
|
||||
+
|
||||
+# The default SASL configuration file is located in /etc/sasl2/
|
||||
+# When running libvirtd unprivileged, it may be desirable to
|
||||
+# override the configs in this location. Set this parameter to
|
||||
+# point to the directory, and create a qemu.conf in that location
|
||||
+#
|
||||
+# vnc_sasl_dir = "/some/directory/sasl2"
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
# The default security driver is SELinux. If SELinux is disabled
|
||||
# on the host, then the security driver will automatically disable
|
||||
# itself. If you wish to disable QEMU SELinux security driver while
|
||||
diff -r 961d4b1ca1d3 src/qemu_conf.c
|
||||
--- a/src/qemu_conf.c Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/src/qemu_conf.c Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -161,6 +161,21 @@ int qemudLoadDriverConfig(struct qemud_d
|
||||
}
|
||||
}
|
||||
|
||||
+ p = virConfGetValue (conf, "vnc_sasl");
|
||||
+ CHECK_TYPE ("vnc_sasl", VIR_CONF_LONG);
|
||||
+ if (p) driver->vncSASL = p->l;
|
||||
+
|
||||
+ p = virConfGetValue (conf, "vnc_sasl_dir");
|
||||
+ CHECK_TYPE ("vnc_sasl_dir", VIR_CONF_STRING);
|
||||
+ if (p && p->str) {
|
||||
+ VIR_FREE(driver->vncSASLdir);
|
||||
+ if (!(driver->vncSASLdir = strdup(p->str))) {
|
||||
+ virReportOOMError(NULL);
|
||||
+ virConfFree(conf);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
virConfFree (conf);
|
||||
return 0;
|
||||
}
|
||||
@@ -838,15 +853,20 @@ int qemudBuildCommandLine(virConnectPtr
|
||||
goto no_memory; \
|
||||
} while (0)
|
||||
|
||||
+#define ADD_ENV_PAIR(envname, val) \
|
||||
+ do { \
|
||||
+ char *envval; \
|
||||
+ ADD_ENV_SPACE; \
|
||||
+ if (virAsprintf(&envval, "%s=%s", envname, val) < 0) \
|
||||
+ goto no_memory; \
|
||||
+ qenv[qenvc++] = envval; \
|
||||
+ } while (0)
|
||||
+
|
||||
#define ADD_ENV_COPY(envname) \
|
||||
do { \
|
||||
char *val = getenv(envname); \
|
||||
- char *envval; \
|
||||
- ADD_ENV_SPACE; \
|
||||
if (val != NULL) { \
|
||||
- if (virAsprintf(&envval, "%s=%s", envname, val) < 0) \
|
||||
- goto no_memory; \
|
||||
- qenv[qenvc++] = envval; \
|
||||
+ ADD_ENV_PAIR(envname, val); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
@@ -1295,6 +1315,15 @@ int qemudBuildCommandLine(virConnectPtr
|
||||
driver->vncTLSx509certdir);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ if (driver->vncSASL) {
|
||||
+ virBufferAddLit(&opt, ",sasl");
|
||||
+
|
||||
+ if (driver->vncSASLdir)
|
||||
+ ADD_ENV_PAIR("SASL_CONF_DIR", driver->vncSASLdir);
|
||||
+
|
||||
+ /* TODO: Support ACLs later */
|
||||
+ }
|
||||
} else {
|
||||
virBufferVSprintf(&opt, "%d",
|
||||
vm->def->graphics->data.vnc.port - 5900);
|
||||
diff -r 961d4b1ca1d3 src/qemu_conf.h
|
||||
--- a/src/qemu_conf.h Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/src/qemu_conf.h Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -73,9 +73,11 @@ struct qemud_driver {
|
||||
char *stateDir;
|
||||
unsigned int vncTLS : 1;
|
||||
unsigned int vncTLSx509verify : 1;
|
||||
+ unsigned int vncSASL : 1;
|
||||
char *vncTLSx509certdir;
|
||||
char *vncListen;
|
||||
char *vncPassword;
|
||||
+ char *vncSASLdir;
|
||||
|
||||
virCapsPtr caps;
|
||||
|
||||
diff -r 961d4b1ca1d3 src/qemu_driver.c
|
||||
--- a/src/qemu_driver.c Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/src/qemu_driver.c Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -620,6 +620,7 @@ qemudShutdown(void) {
|
||||
VIR_FREE(qemu_driver->vncTLSx509certdir);
|
||||
VIR_FREE(qemu_driver->vncListen);
|
||||
VIR_FREE(qemu_driver->vncPassword);
|
||||
+ VIR_FREE(qemu_driver->vncSASLdir);
|
||||
|
||||
/* Free domain callback list */
|
||||
virDomainEventCallbackListFree(qemu_driver->domainEventCallbacks);
|
||||
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.args Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -0,0 +1,1 @@
|
||||
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test SASL_CONF_DIR=/root/.sasl2 /usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -pidfile /nowhere/QEMUGuest1.pid -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3,sasl
|
||||
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -0,0 +1,24 @@
|
||||
+<domain type='qemu'>
|
||||
+ <name>QEMUGuest1</name>
|
||||
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
+ <memory>219200</memory>
|
||||
+ <currentMemory>219200</currentMemory>
|
||||
+ <vcpu>1</vcpu>
|
||||
+ <os>
|
||||
+ <type arch='i686' machine='pc'>hvm</type>
|
||||
+ <boot dev='hd'/>
|
||||
+ </os>
|
||||
+ <clock offset='utc'/>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>restart</on_reboot>
|
||||
+ <on_crash>destroy</on_crash>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/bin/qemu</emulator>
|
||||
+ <disk type='block' device='disk'>
|
||||
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
+ <target dev='hda' bus='ide'/>
|
||||
+ </disk>
|
||||
+ <input type='mouse' bus='ps2'/>
|
||||
+ <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.args
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.args Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -0,0 +1,1 @@
|
||||
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test SASL_CONF_DIR=/root/.sasl2 /usr/bin/qemu -S -M pc -m 214 -smp 1 -monitor pty -pidfile /nowhere/QEMUGuest1.pid -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -vnc 127.0.0.1:3,tls,x509verify=/etc/pki/tls/qemu,sasl
|
||||
diff -r 961d4b1ca1d3 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -0,0 +1,24 @@
|
||||
+<domain type='qemu'>
|
||||
+ <name>QEMUGuest1</name>
|
||||
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||
+ <memory>219200</memory>
|
||||
+ <currentMemory>219200</currentMemory>
|
||||
+ <vcpu>1</vcpu>
|
||||
+ <os>
|
||||
+ <type arch='i686' machine='pc'>hvm</type>
|
||||
+ <boot dev='hd'/>
|
||||
+ </os>
|
||||
+ <clock offset='utc'/>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>restart</on_reboot>
|
||||
+ <on_crash>destroy</on_crash>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/bin/qemu</emulator>
|
||||
+ <disk type='block' device='disk'>
|
||||
+ <source dev='/dev/HostVG/QEMUGuest1'/>
|
||||
+ <target dev='hda' bus='ide'/>
|
||||
+ </disk>
|
||||
+ <input type='mouse' bus='ps2'/>
|
||||
+ <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'/>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
diff -r 961d4b1ca1d3 tests/qemuxml2argvtest.c
|
||||
--- a/tests/qemuxml2argvtest.c Wed Mar 04 13:17:44 2009 +0000
|
||||
+++ b/tests/qemuxml2argvtest.c Thu Mar 05 14:22:50 2009 +0000
|
||||
@@ -213,6 +213,19 @@ mymain(int argc, char **argv)
|
||||
QEMUD_CMD_FLAG_DRIVE_CACHE_V2);
|
||||
DO_TEST("disk-usb", 0);
|
||||
DO_TEST("graphics-vnc", 0);
|
||||
+
|
||||
+ driver.vncSASL = 1;
|
||||
+ driver.vncSASLdir = strdup("/root/.sasl2");
|
||||
+ DO_TEST("graphics-vnc-sasl", 0);
|
||||
+ driver.vncTLS = 1;
|
||||
+ driver.vncTLSx509verify = 1;
|
||||
+ driver.vncTLSx509certdir = strdup("/etc/pki/tls/qemu");
|
||||
+ DO_TEST("graphics-vnc-tls", 0);
|
||||
+ driver.vncSASL = driver.vncTLSx509verify = driver.vncTLS = 0;
|
||||
+ free(driver.vncSASLdir);
|
||||
+ free(driver.vncTLSx509certdir);
|
||||
+ driver.vncSASLdir = driver.vncTLSx509certdir = NULL;
|
||||
+
|
||||
DO_TEST("graphics-sdl", 0);
|
||||
DO_TEST("graphics-sdl-fullscreen", 0);
|
||||
DO_TEST("input-usbmouse", 0);
|
||||
51
libvirt-0.6.4-svirt-sound.patch
Normal file
51
libvirt-0.6.4-svirt-sound.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
From 127a39777e9809053bb98a9082e27c73543ccfa2 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel P. Berrange <berrange@redhat.com>
|
||||
Date: Mon, 17 Aug 2009 08:32:08 +0100
|
||||
Subject: [PATCH] Disable sound cards when running sVirt
|
||||
|
||||
Temporary hack till PulseAudio autostart problems are sorted out when
|
||||
SELinux enforcing (bz 486112)
|
||||
|
||||
Fedora-patch: libvirt-0.6.4-svirt-sound.patch
|
||||
---
|
||||
src/qemu_conf.c | 17 ++++++++++++++++-
|
||||
1 files changed, 16 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
|
||||
index f92bcef..f3b4ef0 100644
|
||||
--- a/src/qemu_conf.c
|
||||
+++ b/src/qemu_conf.c
|
||||
@@ -1510,6 +1510,20 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||
char uuid[VIR_UUID_STRING_BUFLEN];
|
||||
char domid[50];
|
||||
const char *cpu = NULL;
|
||||
+ int skipSound = 0;
|
||||
+
|
||||
+ if (driver->securityDriver &&
|
||||
+ driver->securityDriver->name &&
|
||||
+ STREQ(driver->securityDriver->name, "selinux") &&
|
||||
+ getuid() == 0) {
|
||||
+ static int soundWarned = 0;
|
||||
+ skipSound = 1;
|
||||
+ if (def->nsounds &&
|
||||
+ !soundWarned) {
|
||||
+ soundWarned = 1;
|
||||
+ VIR_WARN0("Sound cards for VMs are disabled while SELinux security model is active");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
uname_normalize(&ut);
|
||||
|
||||
@@ -2181,7 +2195,8 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||
}
|
||||
|
||||
/* Add sound hardware */
|
||||
- if (def->nsounds) {
|
||||
+ if (def->nsounds &&
|
||||
+ !skipSound) {
|
||||
int size = 100;
|
||||
char *modstr;
|
||||
if (VIR_ALLOC_N(modstr, size+1) < 0)
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
32
libvirt-fix-drv-supports-feature-bogus-error.patch
Normal file
32
libvirt-fix-drv-supports-feature-bogus-error.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
From 2f6e857ac7d6ed5cd417e684147dd9c98775ab3d Mon Sep 17 00:00:00 2001
|
||||
From: Chris Lalancette <clalance@redhat.com>
|
||||
Date: Mon, 21 Sep 2009 14:53:31 +0200
|
||||
Subject: [PATCH] Don't do virSetConnError when virDrvSupportsFeature is successful.
|
||||
|
||||
Signed-off-by: Chris Lalancette <clalance@redhat.com>
|
||||
Fedora-patch: libvirt-fix-drv-supports-feature-bogus-error.patch
|
||||
---
|
||||
src/libvirt.c | 7 +++++--
|
||||
1 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libvirt.c b/src/libvirt.c
|
||||
index 4a11688..fa59dc7 100644
|
||||
--- a/src/libvirt.c
|
||||
+++ b/src/libvirt.c
|
||||
@@ -1349,8 +1349,11 @@ virDrvSupportsFeature (virConnectPtr conn, int feature)
|
||||
}
|
||||
|
||||
ret = VIR_DRV_SUPPORTS_FEATURE (conn->driver, conn, feature);
|
||||
- /* Copy to connection error object for back compatability */
|
||||
- virSetConnError(conn);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ /* Copy to connection error object for back compatability */
|
||||
+ virSetConnError(conn);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
46
libvirt-fix-net-hotunplug-double-free.patch
Normal file
46
libvirt-fix-net-hotunplug-double-free.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From d09ff3c35c29d14760d5ea03559042cc024e09ab Mon Sep 17 00:00:00 2001
|
||||
From: Mark McLoughlin <markmc@redhat.com>
|
||||
Date: Thu, 17 Sep 2009 15:31:08 +0100
|
||||
Subject: [PATCH] Fix net/disk hot-unplug segfault
|
||||
|
||||
When we hot-unplug the last device, we're currently double-freeing
|
||||
the device definition.
|
||||
|
||||
Reported by Michal Nowak here:
|
||||
|
||||
https://bugzilla.redhat.com/523953
|
||||
|
||||
* src/qemu_driver.c: fix double free
|
||||
|
||||
(cherry-picked from commit 8881ae1bf8783006777429403cc543c33187175d)
|
||||
|
||||
Fedora-patch: libvirt-fix-net-hotunplug-double-free.patch
|
||||
---
|
||||
src/qemu_driver.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
|
||||
index a65334f..de31581 100644
|
||||
--- a/src/qemu_driver.c
|
||||
+++ b/src/qemu_driver.c
|
||||
@@ -5998,7 +5998,7 @@ try_command:
|
||||
/* ignore, harmless */
|
||||
}
|
||||
} else {
|
||||
- VIR_FREE(vm->def->disks[0]);
|
||||
+ VIR_FREE(vm->def->disks);
|
||||
vm->def->ndisks = 0;
|
||||
}
|
||||
virDomainDiskDefFree(detach);
|
||||
@@ -6100,7 +6100,7 @@ qemudDomainDetachNetDevice(virConnectPtr conn,
|
||||
/* ignore, harmless */
|
||||
}
|
||||
} else {
|
||||
- VIR_FREE(vm->def->nets[0]);
|
||||
+ VIR_FREE(vm->def->nets);
|
||||
vm->def->nnets = 0;
|
||||
}
|
||||
virDomainNetDefFree(detach);
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
50
libvirt-fix-pci-hostdev-hotunplug-leak.patch
Normal file
50
libvirt-fix-pci-hostdev-hotunplug-leak.patch
Normal file
@@ -0,0 +1,50 @@
|
||||
From d04ac8624f5fabe7587982796f2e2161220b0fcc Mon Sep 17 00:00:00 2001
|
||||
From: Mark McLoughlin <markmc@redhat.com>
|
||||
Date: Thu, 17 Sep 2009 15:32:45 +0100
|
||||
Subject: [PATCH] Fix leak in PCI hostdev hot-unplug
|
||||
|
||||
* src/qemu_driver.c: sync the hostdev hot-unplug code with the disk/net
|
||||
code.
|
||||
|
||||
(cherry-picked from commit a70da51ff76ed860bfc0cdee2e1d556da997c557)
|
||||
|
||||
Fedora-patch: libvirt-fix-pci-hostdev-hotunplug-leak.patch
|
||||
---
|
||||
src/qemu_driver.c | 20 +++++++++++++-------
|
||||
1 files changed, 13 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
|
||||
index de31581..2ddcdc0 100644
|
||||
--- a/src/qemu_driver.c
|
||||
+++ b/src/qemu_driver.c
|
||||
@@ -6206,14 +6206,20 @@ static int qemudDomainDetachHostPciDevice(virConnectPtr conn,
|
||||
pciFreeDevice(conn, pci);
|
||||
}
|
||||
|
||||
- if (i != --vm->def->nhostdevs)
|
||||
- memmove(&vm->def->hostdevs[i],
|
||||
- &vm->def->hostdevs[i+1],
|
||||
- sizeof(*vm->def->hostdevs) * (vm->def->nhostdevs-i));
|
||||
- if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs) < 0) {
|
||||
- virReportOOMError(conn);
|
||||
- ret = -1;
|
||||
+ if (vm->def->nhostdevs > 1) {
|
||||
+ memmove(vm->def->hostdevs + i,
|
||||
+ vm->def->hostdevs + i + 1,
|
||||
+ sizeof(*vm->def->hostdevs) *
|
||||
+ (vm->def->nhostdevs - (i + 1)));
|
||||
+ vm->def->nhostdevs--;
|
||||
+ if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs) < 0) {
|
||||
+ /* ignore, harmless */
|
||||
+ }
|
||||
+ } else {
|
||||
+ VIR_FREE(vm->def->hostdevs);
|
||||
+ vm->def->nhostdevs = 0;
|
||||
}
|
||||
+ virDomainHostdevDefFree(detach);
|
||||
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
53
libvirt-fix-qemu-raw-format-save.patch
Normal file
53
libvirt-fix-qemu-raw-format-save.patch
Normal file
@@ -0,0 +1,53 @@
|
||||
From e50c91fdcea5d81e3eb2051c05f4e51a16c3e692 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Duffy <Charles_Duffy@dell.com>
|
||||
Date: Fri, 18 Sep 2009 11:32:35 -0500
|
||||
Subject: [PATCH] Prevent attempt to call cat -c during virDomainSave to raw
|
||||
|
||||
Fedora-patch: libvirt-fix-qemu-raw-format-save.patch
|
||||
---
|
||||
src/qemu_driver.c | 28 ++++++++++++++++++----------
|
||||
1 files changed, 18 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
|
||||
index 2ddcdc0..7c7b985 100644
|
||||
--- a/src/qemu_driver.c
|
||||
+++ b/src/qemu_driver.c
|
||||
@@ -3905,17 +3905,25 @@ static int qemudDomainSave(virDomainPtr dom,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
- const char *prog = qemudSaveCompressionTypeToString(header.compressed);
|
||||
- if (prog == NULL) {
|
||||
- qemudReportError(dom->conn, dom, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
- _("Invalid compress format %d"), header.compressed);
|
||||
- goto cleanup;
|
||||
- }
|
||||
+ {
|
||||
+ const char *prog = qemudSaveCompressionTypeToString(header.compressed);
|
||||
+ const char *args;
|
||||
|
||||
- if (STREQ (prog, "raw"))
|
||||
- prog = "cat";
|
||||
- internalret = virAsprintf(&command, "migrate \"exec:"
|
||||
- "%s -c >> '%s' 2>/dev/null\"", prog, safe_path);
|
||||
+ if (prog == NULL) {
|
||||
+ qemudReportError(dom->conn, dom, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
+ _("Invalid compress format %d"), header.compressed);
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+
|
||||
+ if (STREQ (prog, "raw")) {
|
||||
+ prog = "cat";
|
||||
+ args = "";
|
||||
+ } else {
|
||||
+ args = "-c";
|
||||
+ }
|
||||
+ internalret = virAsprintf(&command, "migrate \"exec:"
|
||||
+ "%s %s >> '%s' 2>/dev/null\"", prog, args, safe_path);
|
||||
+ }
|
||||
|
||||
if (internalret < 0) {
|
||||
virReportOOMError(dom->conn);
|
||||
--
|
||||
1.6.2.5
|
||||
|
||||
743
libvirt.spec
743
libvirt.spec
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user