modules: support getting app_id in pw_check_flatpak

Support getting the Flatpak application ID from the .flatpak-info file,
similarly as what xdg-desktop-portal does.
This commit is contained in:
Pauli Virtanen 2022-07-30 21:29:42 +03:00 committed by Wim Taymans
parent 5e5339ce6c
commit 3730e54484
6 changed files with 89 additions and 5 deletions

View file

@ -424,7 +424,7 @@ on_connect(void *data, int fd, uint32_t mask)
pw_log_warn("setsockopt(SO_PRIORITY) failed: %m");
#endif
pid = get_client_pid(client, client_fd);
if (pid != 0 && pw_check_flatpak(pid) == 1)
if (pid != 0 && pw_check_flatpak(pid, NULL, NULL) == 1)
client_access = "flatpak";
}
else if (server->addr.ss_family == AF_INET || server->addr.ss_family == AF_INET6) {