Skip to content
Commit 7d4d48cf authored by Carlo Castoldi's avatar Carlo Castoldi Committed by Georges Basile Stavracas Neto
Browse files

Retrieve Application ID from PID's cgroup

This commit adds an optional dependency on libsystemd and, when
available, uses it to attempt to find an application ID even for
processes which are not Snap or Flatpak sandboxes. This is not always
successful, so we still need to handle the case of an empty app ID for
an XdpAppInfo.

Since this is not a perfect solution for finding the app ID, we may
eventually want to introduce a way for *unsandboxed* processes to
specify their own app ID, perhaps a portal-wide SetAppID() method. This
is analogous to the security model gnome-shell has: if a process is
sandboxed use that app ID, and otherwise use information that is under
the control of the application (e.g. WM_CLASS, GApplication ID, etc.).

Helps: #579

(Originally authored by Carlo Castoldi, re-done by Phaedrus Leeds)
parent 9b0c9d46
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment