mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-access: move EACCES check to pw_check_flatpak
Decisions on whether an application is considered Flatpak sandboxed
should be in pw_check_flatpak.
Added the comment from 4169d9196d why we consider EACCES as
non-sandboxed. This is probably OK as it shouldn't occur on functioning
Flatpak setup.
This commit is contained in:
parent
e3a69d1932
commit
4bd1cc8fcd
2 changed files with 11 additions and 17 deletions
|
|
@ -263,17 +263,11 @@ context_check_access(void *data, struct pw_impl_client *client)
|
|||
|
||||
res = pw_check_flatpak(pid, &flatpak_app_id, NULL);
|
||||
if (res != 0) {
|
||||
if (res < 0) {
|
||||
if (res == -EACCES) {
|
||||
access = "unrestricted";
|
||||
goto granted;
|
||||
}
|
||||
if (res < 0)
|
||||
pw_log_warn("%p: client %p sandbox check failed: %s",
|
||||
impl, client, spa_strerror(res));
|
||||
}
|
||||
else if (res > 0) {
|
||||
else
|
||||
pw_log_debug(" %p: flatpak client %p added", impl, client);
|
||||
}
|
||||
access = "flatpak";
|
||||
items[nitems++] = SPA_DICT_ITEM_INIT("pipewire.access.portal.app_id",
|
||||
flatpak_app_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue