flatpak: only update permissions on sandboxed clients

This commit is contained in:
Wim Taymans 2018-12-12 15:47:01 +01:00
parent 39078f2abc
commit 73aac68908

View file

@ -61,6 +61,7 @@ struct client_info {
struct spa_list async_pending;
bool checked;
bool camera_allowed;
bool sandboxed;
};
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);
return;
}
cinfo->sandboxed = true;
if (res < 0) {
pw_log_warn("module %p: client %p sandbox check failed: %s",
@ -446,9 +448,11 @@ core_global_added(void *data, struct pw_global *global)
do_portal_check(cinfo);
}
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);
}
}
}
static void