]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virt-aa-helper: add unix channels (esp for qemu-guest-agent)
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 10 Apr 2015 20:21:03 +0000 (20:21 +0000)
committerJán Tomko <jtomko@redhat.com>
Tue, 14 Apr 2015 12:06:27 +0000 (14:06 +0200)
The original bug report was at
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1393842

Also skip abstract unix sockets.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/security/virt-aa-helper.c

index e53779e3a7a349688e7e81d48c54e23b5eec17ac..5a070d738c30c0b3c145496d698e2b0b5e928f42 100644 (file)
@@ -998,8 +998,10 @@ get_files(vahControl * ctl)
             (ctl->def->channels[i]->source.type == VIR_DOMAIN_CHR_TYPE_PTY ||
              ctl->def->channels[i]->source.type == VIR_DOMAIN_CHR_TYPE_DEV ||
              ctl->def->channels[i]->source.type == VIR_DOMAIN_CHR_TYPE_FILE ||
+             ctl->def->channels[i]->source.type == VIR_DOMAIN_CHR_TYPE_UNIX ||
              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 &&
+            ctl->def->channels[i]->source.data.file.path[0] != '\0')
             if (vah_add_file_chardev(&buf,
                                      ctl->def->channels[i]->source.data.file.path,
                                      "rw",