A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ?

Mark Millard marklmi at yahoo.com
Sat Apr 24 02:12:23 UTC 2021



On 2021-Apr-23, at 02:59, Gleb Popov <arrowd at freebsd.org> wrote:

> All right, I got an answer from Collabora and they confirmed that it is a
> bug on their side.
> 
> They indeed wanted to check creds on the accepted socket, not the listening
> one.
> 
> So, unless I am missing something, I think it is good to have FreeBSD error
> out in this case.

FreeBSD's Linux-compatibility code may well be desired to
have the same behavior as Linux implementations do, even
if the specific example from Collabora via this issue was
found only mistakenly put the functionality to use (in
both Linux and FreeBSD). There may be other Linux code
that does deliberately put the functionality to use.

The FreeSD-native API properties need not be driven by
Linux implementation properites.

Konstantin has the examples to use in making the choices,
with pid information to help make the behavior clear.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-hackers mailing list