mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
client: update busy status after check_access
So that we block clients without permissions
This commit is contained in:
parent
f2c1ab6069
commit
4d4904187b
1 changed files with 10 additions and 2 deletions
|
|
@ -273,6 +273,13 @@ static const struct pw_context_events context_events = {
|
|||
.global_removed = context_global_removed,
|
||||
};
|
||||
|
||||
static void update_busy(struct pw_impl_client *client)
|
||||
{
|
||||
struct pw_permission *def;
|
||||
def = find_permission(client, PW_ID_CORE);
|
||||
pw_impl_client_set_busy(client, (def->permissions & PW_PERM_R) ? false : true);
|
||||
}
|
||||
|
||||
/** Make a new client object
|
||||
*
|
||||
* \param context a \ref pw_context object to register the client with
|
||||
|
|
@ -346,6 +353,8 @@ struct pw_impl_client *pw_context_create_client(struct pw_impl_core *core,
|
|||
|
||||
pw_context_emit_check_access(this->context, this);
|
||||
|
||||
update_busy(this);
|
||||
|
||||
return this;
|
||||
|
||||
error_clear_array:
|
||||
|
|
@ -633,8 +642,7 @@ int pw_impl_client_update_permissions(struct pw_impl_client *client,
|
|||
pw_global_update_permissions(global, client, old_perm, new_perm);
|
||||
}
|
||||
}
|
||||
def = find_permission(client, PW_ID_CORE);
|
||||
pw_impl_client_set_busy(client, (def->permissions & PW_PERM_R) ? false : true);
|
||||
update_busy(client);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue