sd_pid_get_owner_uid(3) on Linux
The text ae4f9cb4805b, as Debian 13 (Trixie) shipped it.
Determine the owner uid of the user unit or session, or the session, user unit, system unit, container/VM or slice that a specific PID or socket peer belongs to