mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-20 06:59:58 -05:00
flatpak: only update permissions on sandboxed clients
This commit is contained in:
parent
39078f2abc
commit
73aac68908
1 changed files with 6 additions and 2 deletions
|
|
@ -61,6 +61,7 @@ struct client_info {
|
||||||
struct spa_list async_pending;
|
struct spa_list async_pending;
|
||||||
bool checked;
|
bool checked;
|
||||||
bool camera_allowed;
|
bool camera_allowed;
|
||||||
|
bool sandboxed;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct async_pending {
|
struct async_pending {
|
||||||
|
|
@ -434,6 +435,7 @@ core_global_added(void *data, struct pw_global *global)
|
||||||
pw_log_debug("module %p: non sandboxed client %p", impl, client);
|
pw_log_debug("module %p: non sandboxed client %p", impl, client);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
cinfo->sandboxed = true;
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
pw_log_warn("module %p: client %p sandbox check failed: %s",
|
pw_log_warn("module %p: client %p sandbox check failed: %s",
|
||||||
|
|
@ -446,10 +448,12 @@ core_global_added(void *data, struct pw_global *global)
|
||||||
do_portal_check(cinfo);
|
do_portal_check(cinfo);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
spa_list_for_each(cinfo, &impl->client_list, link)
|
spa_list_for_each(cinfo, &impl->client_list, link) {
|
||||||
|
if (cinfo->sandboxed)
|
||||||
set_global_permissions(cinfo, global);
|
set_global_permissions(cinfo, global);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
core_global_removed(void *data, struct pw_global *global)
|
core_global_removed(void *data, struct pw_global *global)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue