]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add missing defaultConsoleTargetType callback for AppArmour
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Nov 2011 10:17:28 +0000 (10:17 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 7 Nov 2011 15:15:25 +0000 (15:15 +0000)
Every instance of virCapsPtr must have the defaultConsoleTargetType
field set.

* src/security/virt-aa-helper.c: Add defaultConsoleTargetType to
  virCapsPtr

src/security/virt-aa-helper.c

index 71a4586f31bfd4ccb75a7dd8434fbf27529dcc20..ad0697424fa6f5a9fe18f0c93876441dd489dd31 100644 (file)
@@ -685,6 +685,11 @@ caps_mockup(vahControl * ctl, const char *xmlStr)
     return rc;
 }
 
+static int aaDefaultConsoleType(const char *ostype ATTRIBUTE_UNUSED)
+{
+    return VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
+}
+
 static int
 get_definition(vahControl * ctl, const char *xmlStr)
 {
@@ -703,6 +708,8 @@ get_definition(vahControl * ctl, const char *xmlStr)
         goto exit;
     }
 
+    ctl->caps->defaultConsoleTargetType = aaDefaultConsoleType;
+
     if ((guest = virCapabilitiesAddGuest(ctl->caps,
                                          ctl->hvm,
                                          ctl->arch,