getpeereid(3) on macOS
The text 602452c979de, as Mac OS X 10.2.8.G5, Mac OS X 10.2.8, Mac OS X 10.2.7, Mac OS X 10.2.6, Mac OS X 10.2.5, Mac OS X 10.2.4, Mac OS X 10.2.3, Mac OS X 10.2.2, Mac OS X 10.2.1, Mac OS X 10.2 shipped it.
get the effective credentials of a UNIX-domain peer