mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
permissions: use current_client for security checks
Don't pass around the client object but keep track of the current client in the core object. This way we don't need to add a client argument to functions and can check security when needed.
This commit is contained in:
parent
ab099d09dd
commit
ff17fb68b5
10 changed files with 32 additions and 21 deletions
|
|
@ -83,13 +83,13 @@ static void *create_object(void *_data,
|
|||
core = pw_client_get_core(client);
|
||||
t = pw_core_get_type(core);
|
||||
|
||||
global = pw_core_find_global(core, client, output_node_id);
|
||||
global = pw_core_find_global(core, output_node_id);
|
||||
if (global == NULL || pw_global_get_type(global) != t->node)
|
||||
goto no_output;
|
||||
|
||||
output_node = pw_global_get_object(global);
|
||||
|
||||
global = pw_core_find_global(core, client, input_node_id);
|
||||
global = pw_core_find_global(core, input_node_id);
|
||||
if (global == NULL || pw_global_get_type(global) != t->node)
|
||||
goto no_input;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue