Re: Working around platform limitations on GetConnectionUnixProcessID?

Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]> Sun, 20 Apr 2025 11:00:52 +1200
Newsgroups gmane.comp.freedesktop.dbus
Organization Geek Central
Message-ID <[email protected]>
On Sun, 20 Apr 2025 00:37:50 +0200, Ren=C3=A9 J.V. Bertin wrote:

> Darwin is some the userland from some BSD flavour on top of a Mach
> kernel. That's where the issue could be.

Some important system update got lost in the maze of different forks
and parallel reinventions in the BSD world?

> Adding a method to return the own PID was a piece of cake in a
> Qt-based application. Reading the value from the returned `(a{sv})`
> container in a GLib-based application was a lot more trial-and-error
> work...

Are you *trusting* the other end to return correct information about
itself? Because the whole point of SO_PEERCRED is that the information
comes from the kernel, so it is not possible for the other end to fake
it.