Getting PID of socket client

From: Johannes Lundberg <johalun0_at_gmail.com>
Date: Sun, 9 Jul 2017 10:03:01 +0200
Hi

Without altering the client code (i.e. adding sendmsg(credentials)), is
there anyway of getting the client PID (or path to binary) using the file
descriptor returned by accept() on the server side?

Similar to Linux's getsockopt with SO_PEERCRED option.

Thanks!
Received on Sun Jul 09 2017 - 06:03:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:12 UTC