[libvirt] [PATCH] virt-aa-helper: add unix channels (esp for qemu-guest-agent) (v2)

Serge Hallyn serge.hallyn at ubuntu.com
Fri Apr 10 20:21:03 UTC 2015


Changelog (v2):
  * skip abstract unix sockets

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 src/security/virt-aa-helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index e53779e..3f0b167 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -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')
             if (vah_add_file_chardev(&buf,
                                      ctl->def->channels[i]->source.data.file.path,
                                      "rw",
-- 
2.1.4




More information about the libvir-list mailing list