I'm building a client/server architecture where a client process can connect to a server using local Unix domain sockets.
The server process is implemented in Qt and uses QLocalServer and QLocalSocket to maintain the connection at the server end.
Is there a way to obtain the PID of the connecting client process from the connection information directly? I don't want to trust the client to tell me its PID over the socket connection as there's a risk the client may try to spoof another process's PID.