4 ms·
This was a recent discovery for me -- you can verify not only the peer uid/gid but also the pid using getsockopt so_peercred. It's very neat indeed (and this is
by matthewaveryusa 6y ago
This was a recent discovery for me -- you can verify not only the peer uid/gid but also the pid using getsockopt so_peercred. It's very neat indeed (and this is what postgres uses in the pg_ident.conf):
https://github.com/postgres/postgres/blob/master/src/port/getpeereid.c#L42-L46 https://github.com/postgres/postgres/blob/master/src/port/ge...