Re: [PATCH] Add missing defaultConsoleTargetType callback for AppArmour

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/11/7 Daniel P. Berrange <berrange@xxxxxxxxxx>:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>
> 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 |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
> index 71a4586..e8e77ba 100644
> --- a/src/security/virt-aa-helper.c
> +++ b/src/security/virt-aa-helper.c
> @@ -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;
>     }
>
> +    caps->defaultConsoleTargetType = aaDefaultConsoleType;
> +
>     if ((guest = virCapabilitiesAddGuest(ctl->caps,
>                                          ctl->hvm,
>                                          ctl->arch,

ACK with ctl->caps instead of caps.

I tested it with that fixed and it works.

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]