hw/xen: Implement XenStore permissions

Store perms as a GList of strings, check permissions.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
This commit is contained in:
Paul Durrant 2023-01-23 16:21:16 +00:00 committed by David Woodhouse
parent 7cabbdb70d
commit be1934dfef
4 changed files with 275 additions and 21 deletions

View file

@ -16,9 +16,15 @@ typedef uint32_t xs_transaction_t;
#define XBT_NULL 0
#define XS_PERM_NONE 0x00
#define XS_PERM_READ 0x01
#define XS_PERM_WRITE 0x02
typedef struct XenstoreImplState XenstoreImplState;
XenstoreImplState *xs_impl_create(void);
XenstoreImplState *xs_impl_create(unsigned int dom_id);
char *xs_perm_as_string(unsigned int perm, unsigned int domid);
/*
* These functions return *positive* error numbers. This is a little