mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
perm: add permission mask to global
Add a mask of possible permissions for a global. Make sure the permissions of an object are limited to the global mask.
This commit is contained in:
parent
9bcc90fdc3
commit
212fe59530
34 changed files with 53 additions and 5 deletions
|
|
@ -292,6 +292,7 @@ int endpoint_stream_init(struct endpoint_stream *this,
|
|||
this->global = pw_global_new (context,
|
||||
PW_TYPE_INTERFACE_EndpointStream,
|
||||
PW_VERSION_ENDPOINT_STREAM,
|
||||
PW_ENDPOINT_STREAM_PERM_MASK,
|
||||
properties, endpoint_stream_bind, this);
|
||||
if (!this->global)
|
||||
goto no_mem;
|
||||
|
|
|
|||
|
|
@ -322,6 +322,7 @@ int endpoint_init(struct endpoint *this,
|
|||
this->global = pw_global_new (context,
|
||||
PW_TYPE_INTERFACE_Endpoint,
|
||||
PW_VERSION_ENDPOINT,
|
||||
PW_ENDPOINT_PERM_MASK,
|
||||
NULL, endpoint_bind, this);
|
||||
if (!this->global)
|
||||
goto no_mem;
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ int endpoint_link_init(struct endpoint_link *this,
|
|||
this->global = pw_global_new(context,
|
||||
PW_TYPE_INTERFACE_EndpointLink,
|
||||
PW_VERSION_ENDPOINT_LINK,
|
||||
PW_ENDPOINT_LINK_PERM_MASK,
|
||||
properties, endpoint_link_bind, this);
|
||||
if (!this->global)
|
||||
goto no_mem;
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ int session_init(struct session *this,
|
|||
this->global = pw_global_new (context,
|
||||
PW_TYPE_INTERFACE_Session,
|
||||
PW_VERSION_SESSION,
|
||||
PW_SESSION_PERM_MASK,
|
||||
NULL, session_bind, this);
|
||||
if (!this->global)
|
||||
goto no_mem;
|
||||
|
|
|
|||
|
|
@ -390,6 +390,7 @@ static void *link_new(struct pw_context *context,
|
|||
impl->global = pw_global_new(context,
|
||||
PW_TYPE_INTERFACE_EndpointLink,
|
||||
PW_VERSION_ENDPOINT_LINK,
|
||||
PW_ENDPOINT_LINK_PERM_MASK,
|
||||
properties,
|
||||
global_bind, impl);
|
||||
if (impl->global == NULL) {
|
||||
|
|
|
|||
|
|
@ -381,6 +381,7 @@ static void *stream_new(struct pw_context *context,
|
|||
impl->global = pw_global_new(context,
|
||||
PW_TYPE_INTERFACE_EndpointStream,
|
||||
PW_VERSION_ENDPOINT_STREAM,
|
||||
PW_ENDPOINT_STREAM_PERM_MASK,
|
||||
properties,
|
||||
global_bind, impl);
|
||||
if (impl->global == NULL) {
|
||||
|
|
|
|||
|
|
@ -390,6 +390,7 @@ static void *endpoint_new(struct pw_context *context,
|
|||
impl->global = pw_global_new(context,
|
||||
PW_TYPE_INTERFACE_Endpoint,
|
||||
PW_VERSION_ENDPOINT,
|
||||
PW_ENDPOINT_PERM_MASK,
|
||||
properties,
|
||||
global_bind, impl);
|
||||
if (impl->global == NULL) {
|
||||
|
|
|
|||
|
|
@ -379,6 +379,7 @@ static void *session_new(struct pw_context *context,
|
|||
impl->global = pw_global_new(context,
|
||||
PW_TYPE_INTERFACE_Session,
|
||||
PW_VERSION_SESSION,
|
||||
PW_SESSION_PERM_MASK,
|
||||
properties,
|
||||
global_bind, impl);
|
||||
if (impl->global == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue