mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
access: add access checks
Rework the access checks. Add owner field to more objects to do access control checks Make sure the object global is set in the object before signaling the new global.
This commit is contained in:
parent
d9bb116d27
commit
4cf59e3953
18 changed files with 230 additions and 200 deletions
|
|
@ -42,6 +42,14 @@ struct _PinosInterface {
|
|||
const void *events;
|
||||
};
|
||||
|
||||
#define PINOS_CORE_METHOD_CLIENT_UPDATE 0
|
||||
#define PINOS_CORE_METHOD_SYNC 1
|
||||
#define PINOS_CORE_METHOD_GET_REGISTRY 2
|
||||
#define PINOS_CORE_METHOD_CREATE_NODE 3
|
||||
#define PINOS_CORE_METHOD_CREATE_CLIENT_NODE 4
|
||||
#define PINOS_CORE_METHOD_UPDATE_TYPES 5
|
||||
#define PINOS_CORE_METHOD_NUM 6
|
||||
|
||||
typedef struct {
|
||||
void (*client_update) (void *object,
|
||||
const SpaDict *props);
|
||||
|
|
@ -71,6 +79,13 @@ typedef struct {
|
|||
#define pinos_core_do_create_client_node(r,...) ((PinosCoreMethods*)r->iface->methods)->create_client_node(r,__VA_ARGS__)
|
||||
#define pinos_core_do_update_types(r,...) ((PinosCoreMethods*)r->iface->methods)->update_types(r,__VA_ARGS__)
|
||||
|
||||
#define PINOS_CORE_EVENT_INFO 0
|
||||
#define PINOS_CORE_EVENT_DONE 1
|
||||
#define PINOS_CORE_EVENT_ERROR 2
|
||||
#define PINOS_CORE_EVENT_REMOVE_ID 3
|
||||
#define PINOS_CORE_EVENT_UPDATE_TYPES 4
|
||||
#define PINOS_CORE_EVENT_NUM 5
|
||||
|
||||
typedef struct {
|
||||
void (*info) (void *object,
|
||||
PinosCoreInfo *info);
|
||||
|
|
@ -94,6 +109,10 @@ typedef struct {
|
|||
#define pinos_core_notify_remove_id(r,...) ((PinosCoreEvents*)r->iface->events)->remove_id(r,__VA_ARGS__)
|
||||
#define pinos_core_notify_update_types(r,...) ((PinosCoreEvents*)r->iface->events)->update_types(r,__VA_ARGS__)
|
||||
|
||||
|
||||
#define PINOS_REGISTRY_METHOD_BIND 0
|
||||
#define PINOS_REGISTRY_METHOD_NUM 1
|
||||
|
||||
typedef struct {
|
||||
void (*bind) (void *object,
|
||||
uint32_t id,
|
||||
|
|
@ -102,6 +121,10 @@ typedef struct {
|
|||
|
||||
#define pinos_registry_do_bind(r,...) ((PinosRegistryMethods*)r->iface->methods)->bind(r,__VA_ARGS__)
|
||||
|
||||
#define PINOS_REGISTRY_EVENT_GLOBAL 0
|
||||
#define PINOS_REGISTRY_EVENT_GLOBAL_REMOVE 1
|
||||
#define PINOS_REGISTRY_EVENT_NUM 2
|
||||
|
||||
typedef struct {
|
||||
void (*global) (void *object,
|
||||
uint32_t id,
|
||||
|
|
@ -113,6 +136,9 @@ typedef struct {
|
|||
#define pinos_registry_notify_global(r,...) ((PinosRegistryEvents*)r->iface->events)->global(r,__VA_ARGS__)
|
||||
#define pinos_registry_notify_global_remove(r,...) ((PinosRegistryEvents*)r->iface->events)->global_remove(r,__VA_ARGS__)
|
||||
|
||||
#define PINOS_MODULE_EVENT_INFO 0
|
||||
#define PINOS_MODULE_EVENT_NUM 1
|
||||
|
||||
typedef struct {
|
||||
void (*info) (void *object,
|
||||
PinosModuleInfo *info);
|
||||
|
|
@ -120,6 +146,9 @@ typedef struct {
|
|||
|
||||
#define pinos_module_notify_info(r,...) ((PinosModuleEvents*)r->iface->events)->info(r,__VA_ARGS__)
|
||||
|
||||
#define PINOS_NODE_EVENT_INFO 0
|
||||
#define PINOS_NODE_EVENT_NUM 1
|
||||
|
||||
typedef struct {
|
||||
void (*info) (void *object,
|
||||
PinosNodeInfo *info);
|
||||
|
|
@ -134,6 +163,12 @@ struct _PinosClientNodeBuffer {
|
|||
SpaBuffer *buffer;
|
||||
};
|
||||
|
||||
#define PINOS_CLIENT_NODE_METHOD_UPDATE 0
|
||||
#define PINOS_CLIENT_NODE_METHOD_PORT_UPDATE 1
|
||||
#define PINOS_CLIENT_NODE_METHOD_EVENT 2
|
||||
#define PINOS_CLIENT_NODE_METHOD_DESTROY 3
|
||||
#define PINOS_CLIENT_NODE_METHOD_NUM 4
|
||||
|
||||
typedef struct {
|
||||
void (*update) (void *object,
|
||||
#define PINOS_MESSAGE_NODE_UPDATE_MAX_INPUTS (1 << 0)
|
||||
|
|
@ -167,6 +202,19 @@ typedef struct {
|
|||
#define pinos_client_node_do_event(r,...) ((PinosClientNodeMethods*)r->iface->methods)->event(r,__VA_ARGS__)
|
||||
#define pinos_client_node_do_destroy(r) ((PinosClientNodeMethods*)r->iface->methods)->destroy(r)
|
||||
|
||||
#define PINOS_CLIENT_NODE_EVENT_DONE 0
|
||||
#define PINOS_CLIENT_NODE_EVENT_EVENT 1
|
||||
#define PINOS_CLIENT_NODE_EVENT_ADD_PORT 2
|
||||
#define PINOS_CLIENT_NODE_EVENT_REMOVE_PORT 3
|
||||
#define PINOS_CLIENT_NODE_EVENT_SET_FORMAT 4
|
||||
#define PINOS_CLIENT_NODE_EVENT_SET_PROPERTY 5
|
||||
#define PINOS_CLIENT_NODE_EVENT_ADD_MEM 6
|
||||
#define PINOS_CLIENT_NODE_EVENT_USE_BUFFERS 7
|
||||
#define PINOS_CLIENT_NODE_EVENT_NODE_COMMAND 8
|
||||
#define PINOS_CLIENT_NODE_EVENT_PORT_COMMAND 9
|
||||
#define PINOS_CLIENT_NODE_EVENT_TRANSPORT 10
|
||||
#define PINOS_CLIENT_NODE_EVENT_NUM 11
|
||||
|
||||
typedef struct {
|
||||
void (*done) (void *object,
|
||||
int datafd);
|
||||
|
|
@ -230,6 +278,9 @@ typedef struct {
|
|||
#define pinos_client_node_notify_port_command(r,...) ((PinosClientNodeEvents*)r->iface->events)->port_command(r,__VA_ARGS__)
|
||||
#define pinos_client_node_notify_transport(r,...) ((PinosClientNodeEvents*)r->iface->events)->transport(r,__VA_ARGS__)
|
||||
|
||||
#define PINOS_CLIENT_EVENT_INFO 0
|
||||
#define PINOS_CLIENT_EVENT_NUM 1
|
||||
|
||||
typedef struct {
|
||||
void (*info) (void *object,
|
||||
PinosClientInfo *info);
|
||||
|
|
@ -237,6 +288,9 @@ typedef struct {
|
|||
|
||||
#define pinos_client_notify_info(r,...) ((PinosClientEvents*)r->iface->events)->info(r,__VA_ARGS__)
|
||||
|
||||
#define PINOS_LINK_EVENT_INFO 0
|
||||
#define PINOS_LINK_EVENT_NUM 1
|
||||
|
||||
typedef struct {
|
||||
void (*info) (void *object,
|
||||
PinosLinkInfo *info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue