Re: Working around platform limitations on GetConnectionUnixProcessID?
Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]> Sun, 20 Apr 2025 10:11:48 +1200
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Sat, 19 Apr 2025 17:08:41 +0200, Ren=C3=A9 J.V. Bertin wrote: > As far as I understand it is impossible to have a working > GetConnectionUnixProcessID request on Darwin (Mac OS). Surely, that is built on top of getsockopt(... SO_PEERCRED ...), which should be supported on the BSDs. From which macOS/Darwin is derived. The invocation procedure may be slightly different from Linux <https://forums.freebsd.org/threads/obtaining-user-credentials-through-a-un= ix-domain-socket.87923/> <https://unix.stackexchange.com/questions/496577/different-order-for-getsoc= kopt-so-peercred-in-linux-and-openbsd> (just some random relevant links I found from a quick search). Seems there was also an issue with lack of socketpair(2) support, but that has now been fixed <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D176419>.