forked from pool/libvirt
- libxl driver: fix initialization of VNC and SDL info for
HVM domains libxl-hvm-vnc.patch bnc#847566 - Allow libvirtd apparmor profile to access /etc/xen/scripts/* OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=320
This commit is contained in:
parent
3973ce3dde
commit
1ec99abbc8
@ -203,7 +203,7 @@ Index: libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd.in
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd.in
|
+++ libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd.in
|
||||||
@@ -0,0 +1,59 @@
|
@@ -0,0 +1,60 @@
|
||||||
+# Last Modified: Fri Aug 19 11:20:36 2011
|
+# Last Modified: Fri Aug 19 11:20:36 2011
|
||||||
+#include <tunables/global>
|
+#include <tunables/global>
|
||||||
+@{LIBVIRT}="libvirt"
|
+@{LIBVIRT}="libvirt"
|
||||||
@ -255,6 +255,7 @@ Index: libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd.in
|
|||||||
+ audit deny /sys/kernel/security/apparmor/matching rwxl,
|
+ audit deny /sys/kernel/security/apparmor/matching rwxl,
|
||||||
+ audit deny /sys/kernel/security/apparmor/.* rwxl,
|
+ audit deny /sys/kernel/security/apparmor/.* rwxl,
|
||||||
+ /sys/kernel/security/apparmor/profiles r,
|
+ /sys/kernel/security/apparmor/profiles r,
|
||||||
|
+ /etc/xen/scripts/* r,
|
||||||
+ @libdir@/libvirt/* Pxr,
|
+ @libdir@/libvirt/* Pxr,
|
||||||
+ @libdir@/libvirt/libvirt_parthelper Ux,
|
+ @libdir@/libvirt/libvirt_parthelper Ux,
|
||||||
+ @libdir@/libvirt/libvirt_iohelper Ux,
|
+ @libdir@/libvirt/libvirt_iohelper Ux,
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 25 13:10:27 MDT 2013 - jfehlig@suse.com
|
||||||
|
|
||||||
|
- libxl driver: fix initialization of VNC and SDL info for
|
||||||
|
HVM domains
|
||||||
|
libxl-hvm-vnc.patch
|
||||||
|
bnc#847566
|
||||||
|
- Allow libvirtd apparmor profile to access /etc/xen/scripts/*
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 22 21:37:08 MDT 2013 - jfehlig@suse.com
|
Tue Oct 22 21:37:08 MDT 2013 - jfehlig@suse.com
|
||||||
|
|
||||||
|
@ -425,6 +425,7 @@ Patch17: e350826c-python-fix-fd-passing.patch
|
|||||||
Patch100: xen-name-for-devid.patch
|
Patch100: xen-name-for-devid.patch
|
||||||
Patch101: clone.patch
|
Patch101: clone.patch
|
||||||
Patch102: xen-pv-cdrom.patch
|
Patch102: xen-pv-cdrom.patch
|
||||||
|
Patch103: libxl-hvm-vnc.patch
|
||||||
# Our patches
|
# Our patches
|
||||||
Patch200: libvirtd-defaults.patch
|
Patch200: libvirtd-defaults.patch
|
||||||
Patch201: libvirtd-init-script.patch
|
Patch201: libvirtd-init-script.patch
|
||||||
@ -953,6 +954,7 @@ of recent versions of Linux (and other OSes).
|
|||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101
|
%patch101
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
|
%patch103 -p1
|
||||||
%patch200 -p1
|
%patch200 -p1
|
||||||
%patch201 -p1
|
%patch201 -p1
|
||||||
%patch202 -p1
|
%patch202 -p1
|
||||||
|
45
libxl-hvm-vnc.patch
Normal file
45
libxl-hvm-vnc.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
Index: libvirt-1.1.2/src/libxl/libxl_conf.c
|
||||||
|
===================================================================
|
||||||
|
--- libvirt-1.1.2.orig/src/libxl/libxl_conf.c
|
||||||
|
+++ libvirt-1.1.2/src/libxl/libxl_conf.c
|
||||||
|
@@ -524,6 +524,30 @@ libxlMakeChrdevStr(virDomainChrDefPtr de
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
+libxlFixupDomBuildInfo(virDomainDefPtr def, libxl_domain_config *d_config)
|
||||||
|
+{
|
||||||
|
+ libxl_domain_build_info *b_info = &d_config->b_info;
|
||||||
|
+ int hvm = STREQ(def->os.type, "hvm");
|
||||||
|
+ libxl_device_vfb vfb;
|
||||||
|
+
|
||||||
|
+ if (!hvm)
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ if (d_config->num_vfbs) {
|
||||||
|
+ vfb = d_config->vfbs[0];
|
||||||
|
+ if (libxl_defbool_val(vfb.vnc.enable))
|
||||||
|
+ memcpy(&b_info->u.hvm.vnc, &vfb.vnc, sizeof(libxl_vnc_info));
|
||||||
|
+ else if (libxl_defbool_val(vfb.sdl.enable))
|
||||||
|
+ memcpy(&b_info->u.hvm.sdl, &vfb.sdl, sizeof(libxl_sdl_info));
|
||||||
|
+ else
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
libxlMakeDomBuildInfo(virDomainObjPtr vm, libxl_domain_config *d_config)
|
||||||
|
{
|
||||||
|
virDomainDefPtr def = vm->def;
|
||||||
|
@@ -1025,6 +1049,9 @@ libxlBuildDomainConfig(libxlDriverPrivat
|
||||||
|
if (libxlMakeVfbList(driver, def, d_config) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
+ if (libxlFixupDomBuildInfo(def, d_config) < 0)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
d_config->on_reboot = def->onReboot;
|
||||||
|
d_config->on_poweroff = def->onPoweroff;
|
||||||
|
d_config->on_crash = def->onCrash;
|
Loading…
Reference in New Issue
Block a user