qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner


From: David Woodhouse
Subject: Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner
Date: Wed, 22 Nov 2023 23:01:00 +0000
User-agent: Evolution 3.44.4-0ubuntu2

On Tue, 2023-11-21 at 22:10 +0000, Volodymyr Babchuk wrote:
> 
> --- a/hw/xen/xen-operations.c
> +++ b/hw/xen/xen-operations.c
> @@ -300,6 +300,18 @@ static bool libxenstore_create(struct qemu_xs_handle *h, 
> xs_transaction_t t,
>          return false;
>      }
>  
> +    if (owner == XS_PRESERVE_OWNER) {
> +        struct xs_permissions *tmp;
> +        unsigned int num;
> +
> +        tmp = xs_get_permissions(h->xsh, t, path, &num);
> +        if (tmp == NULL) {
> +            return false;
> +        }
> +        perms_list[0].id = tmp[0].id;
> +        free(tmp);
> +    }
> +
>      return xs_set_permissions(h->xsh, t, path, perms_list,
>                                ARRAY_SIZE(perms_list));
>  }

If the existing transaction is XBT_NULL I think you want to create a
new transaction for it, don't you?

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]