Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jul 2017 17:43:22 +0100
From:      David Chisnall <theraven@FreeBSD.org>
To:        Stefan Ehmann <shoesoft@gmx.net>
Cc:        Johannes Lundberg <johalun0@gmail.com>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: Getting PID of socket client
Message-ID:  <F13E3EAD-0AE2-458D-98F5-F3D4A6E41137@FreeBSD.org>
In-Reply-To: <684e8346-c4a8-a0c5-cb2a-cd5159d2af1c@gmx.net>
References:  <CAECmPwsD=PYqoG9EA=Wyq16hcrdbf7SQ3Owxdf%2BWSvYWazJfXA@mail.gmail.com> <a42d8db6-675f-b021-fc50-6ef87d310623@gmx.net> <CAECmPwuAm%2Bn6DyFR01OgatxN9Jj3um-50jOpP0jeB4=N%2Bj=yxg@mail.gmail.com> <684e8346-c4a8-a0c5-cb2a-cd5159d2af1c@gmx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9 Jul 2017, at 14:25, Stefan Ehmann <shoesoft@gmx.net> wrote:
>=20
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F13E3EAD-0AE2-458D-98F5-F3D4A6E41137>