Getting PID of socket client
    David Chisnall 
    theraven at FreeBSD.org
       
    Sun Jul  9 16:53:07 UTC 2017
    
    
  
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
    
    
More information about the freebsd-current
mailing list