Getting PID of socket client

Johannes Lundberg johalun0 at gmail.com
Sun Jul 9 08:03:04 UTC 2017


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!


More information about the freebsd-current mailing list