mirror of
https://gitlab.freedesktop.org/pipewire/media-session.git
synced 2025-12-20 06:30:03 +01:00
access: add restricted access permissions
As used when connecting via a network connection.
This commit is contained in:
parent
f715063213
commit
a87008622c
1 changed files with 14 additions and 10 deletions
|
|
@ -93,10 +93,10 @@ static void object_update(void *data)
|
|||
uint32_t perms;
|
||||
|
||||
if (client->obj->info == NULL || client->obj->info->props == NULL ||
|
||||
(str = spa_dict_lookup(client->obj->info->props, PW_KEY_ACCESS)) == NULL ||
|
||||
!spa_streq(str, "flatpak"))
|
||||
(str = spa_dict_lookup(client->obj->info->props, PW_KEY_ACCESS)) == NULL)
|
||||
return;
|
||||
|
||||
if (spa_streq(str, "flatpak")) {
|
||||
if ((str = spa_dict_lookup(client->obj->info->props, PW_KEY_MEDIA_CATEGORY)) != NULL &&
|
||||
(spa_streq(str, "Manager"))) {
|
||||
/* FIXME, use permission store to check if this app is allowed to
|
||||
|
|
@ -106,6 +106,10 @@ static void object_update(void *data)
|
|||
/* limited access for everything else */
|
||||
perms = PW_PERM_R | PW_PERM_X;
|
||||
}
|
||||
} else if (spa_streq(str, "restricted")) {
|
||||
perms = PW_PERM_R | PW_PERM_X;
|
||||
} else
|
||||
return;
|
||||
|
||||
pw_log_info("%p: flatpak client %d granted 0x%08x permissions"
|
||||
, impl, client->id, perms);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue