I'm trying:
Index: libvirt/src/security/virt-aa-helper.c =================================================================== --- libvirt.orig/src/security/virt-aa-helper.c +++ libvirt/src/security/virt-aa-helper.c @@ -939,6 +939,14 @@ add_file_path(virDomainDiskDefPtr disk, }
static int +is_qemu_guest_agent(virDomainChrDefPtr channel) +{ + + return channels->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO && + STREQ_NULLABLE(channels->target.name, "org.qemu.guest_agent.0"; +} + +static int get_files(vahControl * ctl) { virBuffer buf = VIR_BUFFER_INITIALIZER; @@ -1034,6 +1042,8 @@ get_files(vahControl * ctl) ctl->def->channels[i]->source.type == VIR_DOMAIN_CHR_TYPE_PIPE) && ctl->def->channels[i]->source.data.file.path && ctl->def->channels[i]->source.data.file.path[0] != '\0') + if (is_qemu_guest_agent(ctl->def->channels[i])) + virBufferAsprintf(buf, " capability mknod,\n"); if (vah_add_file_chardev(&buf, ctl->def->channels[i]->source.data.file.path, "rw",
I'm trying:
Index: libvirt/ src/security/ virt-aa- helper. c ======= ======= ======= ======= ======= ======= ======= ======= ==== orig/src/ security/ virt-aa- helper. c src/security/ virt-aa- helper. c path(virDomainD iskDefPtr disk,
=======
--- libvirt.
+++ libvirt/
@@ -939,6 +939,14 @@ add_file_
}
static int guest_agent( virDomainChrDef Ptr channel) >targetType == VIR_DOMAIN_ CHR_CHANNEL_ TARGET_ TYPE_VIRTIO && channels- >target. name, "org.qemu. guest_agent. 0"; vahControl * ctl) INITIALIZER; vahControl * ctl)
ctl->def- >channels[ i]->source. type == VIR_DOMAIN_ CHR_TYPE_ PIPE) &&
ctl- >def->channels[ i]->source. data.file. path &&
ctl- >def->channels[ i]->source. data.file. path[0] != '\0') guest_agent( ctl->def- >channels[ i])) tf(buf, " capability mknod,\n"); file_chardev( &buf,
ctl- >def->channels[ i]->source. data.file. path,
"rw" ,
+is_qemu_
+{
+
+ return channels-
+ STREQ_NULLABLE(
+}
+
+static int
get_files(
{
virBuffer buf = VIR_BUFFER_
@@ -1034,6 +1042,8 @@ get_files(
+ if (is_qemu_
+ virBufferAsprin
if (vah_add_