|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 3/7] xen: xenstore: add possibility to preserve owner
On Sat, 2023-11-11 at 11:01 +0000, David Woodhouse 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, 0, path, &num);
> > + if (tmp == NULL) {
> > + return false;
> > + }
> > + perms_list[0].id = tmp[0].id;
> > + free(tmp);
> > + }
> > +
>
> Don't see what saves you from someone else changing it at this point on
> true Xen though. Which is why I'd prefer XenStore to do it natively.
I suppose maybe you could do it in a transaction *if* the transaction_t
you're passed in isn't already XBT_NULL?
One might argue that the mkdir+set_perms in libxenstore_create() ought
to have been within the same transaction *anyway*?
Attachment:
smime.p7s
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |