[Pkg-libvirt-commits] [libvirt] 01/02: Teach virt-aa-helper to use TEMPLATE.qemu if the domain is kvm or kqemu
Guido Guenther
agx at moszumanska.debian.org
Fri Jun 5 15:43:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
agx pushed a commit to branch debian/jessie
in repository libvirt.
commit 8e4cf5a8b6a1547f2a2ecaefc0736ae58e383d59
Author: Guido Günther <agx at sigxcpu.org>
Date: Sun May 24 09:59:56 2015 +0200
Teach virt-aa-helper to use TEMPLATE.qemu if the domain is kvm or kqemu
Thanks: Luke Faraone for the report
Closes: #786650
---
debian/patches/series | 1 +
...aa-helper-to-use-TEMPLATE.qemu-if-the-dom.patch | 41 ++++++++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index fcb95a0..d236118 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -27,3 +27,4 @@ upstream/vbox-fix-a-bug-in-_machineStateInactive.patch
security/CVE-2015-0236-qemu-Check-ACLs-when-dumping-security-.patch
security/CVE-2015-0236-qemu-Check-ACLs-when-dumping-securi-14.patch
qemu-Don-t-try-to-parse-help-for-new-QEM.patch
+upstream/Teach-virt-aa-helper-to-use-TEMPLATE.qemu-if-the-dom.patch
diff --git a/debian/patches/upstream/Teach-virt-aa-helper-to-use-TEMPLATE.qemu-if-the-dom.patch b/debian/patches/upstream/Teach-virt-aa-helper-to-use-TEMPLATE.qemu-if-the-dom.patch
new file mode 100644
index 0000000..c128c71
--- /dev/null
+++ b/debian/patches/upstream/Teach-virt-aa-helper-to-use-TEMPLATE.qemu-if-the-dom.patch
@@ -0,0 +1,41 @@
+From: =?utf-8?q?C=C3=A9dric_Bosdonnat?= <cbosdonnat at suse.com>
+Date: Tue, 28 Oct 2014 14:42:34 -0600
+Subject: Teach virt-aa-helper to use TEMPLATE.qemu if the domain is kvm or
+ kqemu
+
+Closes: #786650
+---
+ src/security/virt-aa-helper.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
+index 9afc8db..1f299a0 100644
+--- a/src/security/virt-aa-helper.c
++++ b/src/security/virt-aa-helper.c
+@@ -341,15 +341,25 @@ create_profile(const char *profile, const char *profile_name,
+ int tlen, plen;
+ int fd;
+ int rc = -1;
++ const char *driver_name = NULL;
+
+ if (virFileExists(profile)) {
+ vah_error(NULL, 0, _("profile exists"));
+ goto end;
+ }
+
++ switch (virtType) {
++ case VIR_DOMAIN_VIRT_QEMU:
++ case VIR_DOMAIN_VIRT_KQEMU:
++ case VIR_DOMAIN_VIRT_KVM:
++ driver_name = "qemu";
++ break;
++ default:
++ driver_name = virDomainVirtTypeToString(virtType);
++ }
+
+ if (virAsprintfQuiet(&template, "%s/TEMPLATE.%s", APPARMOR_DIR "/libvirt",
+- virDomainVirtTypeToString(virtType)) < 0) {
++ driver_name) < 0) {
+ vah_error(NULL, 0, _("template name exceeds maximum length"));
+ goto end;
+ }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git
More information about the Pkg-libvirt-commits
mailing list