Re: Getting PID of socket client

From: David Chisnall <theraven_at_FreeBSD.org>
Date: Sun, 9 Jul 2017 17:43:22 +0100
On 9 Jul 2017, at 14:25, Stefan Ehmann <shoesoft_at_gmx.net> wrote:
> 
> Don't why the structs are not compatible, maybe because:
> "The process ID cmcred_pid should not be looked up (such as via the
> KERN_PROC_PID sysctl) for making security decisions.  The sending process could have exited and its process ID already been reused for a new process."

Note that having the kernel provide a process descriptor instead of a PID would allow the userspace process to have race-free access to the PID.

David
Received on Sun Jul 09 2017 - 14:53:07 UTC

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